angular / angular/components

Datepicker - When open, pressing Esc key should just close datepicker and stop event propagation

オープン
#12,344 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る
area: material/datepicker P3
主要言語
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

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。