Datepicker - When open, pressing Esc key should just close datepicker and stop event propagation
- Vorherrschende Sprache
- TypeScript
- Sterne
- 25k
- Forks
- 6.8k
- Ø Merge
- 1 T. 8 Std.
- Gemergte PRs (30 T.)
- 91
Beschreibung
#### Bug, feature request, or proposal:
When a `Datepicker` is open, pressing `Esc` key closes it, which is fine. The issue arises when the parent component is also monitoring `Esc` key.
For example I have a form which contains the `Datepicker` component. I want the form to be closed when the user presses `Esc` key. But if the user has a `Datepicker` open, and presses `Esc` key, it closes the form, whereas it should only close the `Datepicker`.
#### What is the expected behavior?
`Datepicker` should stop propagation of the same event to the parent.
#### What are the steps to reproduce?
Visit https://stackblitz.com/edit/angular-b1wcka
Open datepicker and press `Esc` key to close `datepicker`, this will close the whole form instead of just closing the `datepicker`.
Beitragsleitfaden
Rechercherichtung
Beginne bei der Behandlung von Tastaturereignissen des Datepicker und reproduziere das Verhalten anhand des verlinkten StackBlitz-Beispiels. Überprüfe, dass das Drücken von Esc den Datepicker schließt, ohne das übergeordnete Formular zu erreichen, während das übrige Tastaturverhalten unverändert bleibt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- angular, typescript
- Bereich
- frontend
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Klar beschrieben
- Anfängerfreundlichkeit
- 45/100