Files
Alexandre Augrain dc1ec44cf7 Don't toggle spellcheck while an IME composition is in progress (#2990)
The composer turns the spellCheck attribute off on the first keystroke and
back on 800ms after the last one (#2535). Both changes can land in the
middle of an IME composition (Chinese, Japanese, Korean input, dead keys):

- The keydown that starts a composition is followed by compositionstart in
  the same task, so the requestAnimationFrame callback that sets isTyping
  runs once the composition is already in progress.
- Slate stops keydowns while it is composing, so onKeyDown never re-arms the
  debounce during a composition. Any composition longer than 800ms gets
  spellcheck re-enabled halfway through.

Toggling this attribute already caused swallowed keystrokes (#2578) and
selection resets (#2644). During a composition, it matches the reported
symptom: typing "ni" with a Pinyin IME produces "i" and the candidate
window disappears.

Track the composition state and leave the attribute alone while it is in
progress. Spellcheck is re-enabled 800ms after compositionend.

Add an e2e test that types a Pinyin composition slower than the debounce and
checks that the attribute does not change while composing.
2026-10-22 15:34:23 -05:00
..
2026-05-05 22:23:02 -05:00