* Implemented as part of MatFormFieldControl. * @docs-private
(event: MouseEvent)
| 1405 | * @docs-private |
| 1406 | */ |
| 1407 | onContainerClick(event: MouseEvent) { |
| 1408 | const target = _getEventTarget(event) as HTMLElement | null; |
| 1409 | |
| 1410 | // Since the overlay is inside the form field, this handler can fire for interactions |
| 1411 | // with the container. Note that while it's redundant to select both for the popover |
| 1412 | // and select panel, we need to do it because it tests the clicks can occur after |
| 1413 | // the panel was detached from the popover. |
| 1414 | if ( |
| 1415 | target && |
| 1416 | (target.tagName === 'MAT-OPTION' || |
| 1417 | target.classList.contains('cdk-overlay-backdrop') || |
| 1418 | target.closest('.mat-mdc-select-panel')) |
| 1419 | ) { |
| 1420 | return; |
| 1421 | } |
| 1422 | |
| 1423 | this.focus(); |
| 1424 | this.open(); |
| 1425 | } |
| 1426 | |
| 1427 | /** |
| 1428 | * Implemented as part of MatFormFieldControl. |
nothing calls this directly
no test coverage detected