Commit deebaae
authored
fix(material/datepicker): avoid interfering with external click listener (#21856)
Currently the datepicker toggle's `click` listener is on the inner `button` element and we
call `stopPropagation` on it in order to prevent the form field from focusing the input.
The problem is that doing so will also prevent any custom `click` handler that the user
might have added to the `mat-datepicker-toggle`.
These changes resolve the issue by moving the listener directly onto the toggle host
which will invoke any external listeners while still allowing us to stop its propagation.
Fixes #21836.1 parent 6f99852 commit deebaae
2 files changed
Lines changed: 5 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
| 9 | + | |
11 | 10 | | |
12 | 11 | | |
13 | 12 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
50 | 54 | | |
51 | 55 | | |
52 | 56 | | |
| |||
0 commit comments