Hotkeys are fired when trying to type into a text field inside a custom element
Open
- Dominant language
- JavaScript
- Stars
- 3.3k
- Forks
- 99
- Avg merge
- 14h 22m
- Merged PRs (30d)
- 6
Description
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/
Contributor guide
Assessment
This issue has not been assessed yet.