Chinese IME composition lost when focus changes in Chrome
OS: Windows 11 · Device: Desktop or Laptop Any · Browser: Chrome 120.0
Open case →Scenario
Japanese IME composition lost when focus changes in Safari
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-0188-japanese-ime-focus-blur-safari | macOS 14.0 | Desktop or Laptop Any | Safari 17.0 | Japanese (IME) | draft |
| ce-0201-chinese-ime-focus-blur-chrome | Windows 11 | Desktop or Laptop Any | Chrome 120.0 | Chinese (IME - Pinyin) | 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 | macOS |
|---|---|---|
| Chrome | — | |
| Safari | — |
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: macOS 14.0 · Device: Desktop or Laptop Any · Browser: Safari 17.0
Open case →Other scenarios that share similar tags or category.
Comprehensive system for managing IME (Input Method Editor) composition state across different browsers and IME implementations, including state tracking, event normalization, and cross-platform consistency.
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.
On macOS, using the accent menu (e.g., holding vowel key to select accented character, or using option+key combinations) does NOT consistently trigger standard IME composition events (`compositionstart`, `compositionupdate`, `compositionend`). This makes it difficult to distinguish accent menu input from IME input or regular keyboard input.
When a page with a contenteditable element becomes hidden (tab switch, minimize), the Page Visibility API may affect editing state. Focus may be lost, and composition may be interrupted.
A known bug in WebKit browsers prevents focus from transferring correctly from contenteditable elements to non-editable elements. A workaround involves using a hidden input field to manage focus transitions.
Have questions, suggestions, or want to share your experience? Join the discussion below.