Datepicker - When open, pressing Esc key should just close datepicker and stop event propagation
- 主要言語
- TypeScript
- スター
- 25k
- フォーク
- 6.8k
- 平均マージ
- 1日 8時間
- マージ済み PR(30日)
- 91
説明
#### 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`.
コントリビューションガイド
調査の方向性
Datepicker のキーボードイベント処理から始め、リンクされている StackBlitz の例を使って動作を再現してください。Esc を押すと Datepicker が親フォームに到達せずに閉じることを確認し、それ以外のキーボード動作は変わらないことを確認してください。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- angular, typescript
- 領域
- frontend
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- 明確に書かれている
- 初心者へのやさしさ
- 45/100