Phenomenon
When using Japanese IME in a contenteditable element, the Space key is used for kanji conversion, which conflicts with inserting a space character. Pressing Space during composition may trigger conversion instead of inserting a space, or may behave inconsistently compared to native text controls.
Reproduction example
- Focus the editable area.
- Activate Japanese IME.
- Type romaji text (e.g., “kanji”).
- Press Space to trigger kanji conversion.
- Try to insert a space character after conversion.
Observed behavior
- Space key triggers kanji conversion instead of inserting a space character
- After conversion, inserting a space may require multiple Space presses
- Behavior may differ from native text input controls
- The order of events (composition, conversion, space insertion) may be inconsistent
Expected behavior
- Space key behavior should be consistent across
contenteditableand native text inputs - Users should be able to reliably insert space characters
- Conversion and space insertion should not conflict
Browser Comparison
- Chrome: Space key behavior may conflict with conversion
- Edge: Similar to Chrome
- Firefox: May have different behavior
- Safari: Not applicable on Windows
Notes and possible direction for workarounds
- Monitor composition and conversion state to distinguish between conversion Space and insertion Space
- Consider using alternative methods to insert spaces during composition
- Handle Space key events carefully during active composition