Duplicate keydown events with keyCode 229 and 13 when pressing Enter during Japanese IME composition
OS: Windows 11 · Device: Desktop or Laptop Any · Browser: Chrome 120.0
Open case →Scenario
Duplicate keydown events with keyCode 229 and 13 when pressing Enter during IME composition
Visual view of how this scenario connects to its concrete cases and environments. Nodes can be dragged and clicked.
Each row is a concrete case for this scenario, with a dedicated document and playground.
| Case | OS | Device | Browser | Keyboard | Status |
|---|---|---|---|---|---|
| ce-0210-ime-keydown-keycode-229-enter-chrome | Windows 11 | Desktop or Laptop Any | Chrome 120.0 | Korean (IME) | draft |
| ce-0211-ime-keydown-keycode-229-enter-firefox | Windows 11 | Desktop or Laptop Any | Firefox 120.0 | Korean (IME) | draft |
| ce-0212-ime-keydown-keycode-229-enter-japanese-chrome | Windows 11 | Desktop or Laptop Any | Chrome 120.0 | Japanese (IME) | draft |
This matrix shows which browser and OS combinations have documented cases for this scenario. Click on a cell to view the specific case.
| Browser | Windows |
|---|---|
| Chrome | |
| Firefox |
This scenario affects multiple languages. Cases are grouped by language/input method below.
OS: Windows 11 · Device: Desktop or Laptop Any · Browser: Chrome 120.0
Open case →OS: Windows 11 · Device: Desktop or Laptop Any · Browser: Chrome 120.0
Open case →OS: Windows 11 · Device: Desktop or Laptop Any · Browser: Firefox 120.0
Open case →Other scenarios that share similar tags or category.
In Safari desktop, when preventDefault() is called on keydown or beforeinput events for insertParagraph (Enter key), the IME composition state becomes corrupted. Subsequent text input fails to trigger proper input events, causing characters to not be inserted or composition to malfunction.
During IME composition or in certain browser/IME combinations, the beforeinput event may have a different inputType than the corresponding input event. For example, beforeinput may fire with insertCompositionText while input fires with deleteContentBackward. This mismatch can cause handlers to misinterpret the actual DOM change and requires storing beforeinput's targetRanges for use in input event handling.
The selection (window.getSelection()) in beforeinput events can differ from the selection in corresponding input events. This mismatch can occur during IME composition, text prediction, or when typing adjacent to formatted elements like links. The selection in beforeinput may include adjacent formatted text, while input selection reflects the final cursor position.
When browser translation features (like Google Translate) are activated, they manipulate the DOM by replacing text content and injecting elements. This can break contenteditable functionality, causing cursor positioning issues, event handling problems, and IME composition failures.
Analysis of how out-of-order or missing composition events disrupt editor state synchronization.
Have questions, suggestions, or want to share your experience? Join the discussion below.