Phenomenon
When composing Chinese text with Pinyin IME in a contenteditable element in Safari on macOS, character conversion may be delayed significantly, or only part of the Pinyin input may be converted to Chinese characters while the rest remains as Pinyin. The conversion process may also be interrupted by clicking, arrow keys, or other interactions.
Reproduction example
- Create a contenteditable div.
- Switch to Chinese Pinyin IME.
- Type Pinyin text (e.g., “nihao” for 你好).
- Wait for conversion or press Space/Enter to trigger conversion.
- Observe conversion timing and completeness.
Observed behavior
- Conversion may take several seconds or not complete
- Only first character may convert while rest remains as Pinyin
- Conversion may be cancelled by clicking or arrow keys
- Multiple candidate selection may not work correctly
- Mixed Pinyin and Chinese characters may appear in text
Expected behavior
- Conversion should complete quickly and reliably
- All Pinyin input should be converted to Chinese characters
- Conversion should not be interrupted by normal interactions
- Candidate selection should work correctly
Impact
- Users experience frustration with slow or incomplete conversions
- Workflow is disrupted when conversions fail
- Text may contain unintentional mixed Pinyin and Chinese characters
Browser Comparison
- Safari: Conversion delays and interruptions are more common
- Chrome: Generally more reliable conversion
- Firefox: May have different conversion behavior
Notes and possible direction for workarounds
- Monitor composition events to detect conversion state
- Delay handling of user interactions during conversion
- Validate text after composition to detect failed conversions
- Provide user feedback when conversion appears to be delayed