Hotkeys are fired when trying to type into a text field inside a custom element
- 主要言語
- JavaScript
- スター
- 3.3k
- フォーク
- 99
- 平均マージ
- 14時間 22分
- マージ済み PR(30日)
- 6
説明
When typing in an input (textarea, input tag, editable, …) which is itself placed inside of a custom html element, the hotkey is still fired. That's because the [isFormField](https://github.com/github/hotkey/blob/main/src/utils.ts#L4) handler checks only the target element, which is this case is the custom element. It should instead use the `explicitOriginalTarget` property, since that contains the actual input element.
Here's a minimal reproduction: https://jsfiddle.net/zm7etdh3/
コントリビューションガイド
調査の方向性
src/utils.ts の isFormField handler から始め、現在の target の処理を issue で説明されている explicitOriginalTarget プロパティと比較します。リンクされている JSFiddle の最小再現を使って、カスタム HTML 要素内の input、textarea、または編集可能な要素で入力しても hotkey が発火しなくなっていることを確認します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- javascript
- 領域
- frontend
- issue の種類
- バグ
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 活発さ
- 停滞
- 明瞭さ
- 明確に書かれている
- 初心者へのやさしさ
- 52/100