-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Closed
Labels
[Package] Components/packages/components/packages/components[Status] In ProgressTracking issues with work in progressTracking issues with work in progress[Type] Code QualityIssues or PRs that relate to code qualityIssues or PRs that relate to code quality
Description
What problem does this address?
The withIgnoreIMEEvents
higher-order function ignores keyboard events during IME (Input Method Editor) composition. These events are intended to interact with the IME itself rather than the host application. More detailed documentation on its usage can be found here:
/** | |
* A higher-order function that wraps a keydown event handler to ensure it is not an IME event. | |
* | |
* In CJK languages, an IME (Input Method Editor) is used to input complex characters. | |
* During an IME composition, keydown events (e.g. Enter or Escape) can be fired | |
* which are intended to control the IME and not the application. | |
* These events should be ignored by any application logic. |
The documentation focuses on using the HOF with keyDown
events, but keyUp
events can also occur during IME composition. For accessibility, especially for CJK users, it's important to wrap both keyDown
and keyUp
handlers to ignore IME events.
Source:
https://developer.mozilla.org/en-US/docs/Web/API/Element/keyup_event#keyup_events_with_ime
What is your proposed solution?
Generalizing the docs will make this clearer.
Metadata
Metadata
Assignees
Labels
[Package] Components/packages/components/packages/components[Status] In ProgressTracking issues with work in progressTracking issues with work in progress[Type] Code QualityIssues or PRs that relate to code qualityIssues or PRs that relate to code quality