You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bug: [lexical] An update during an IME composition that moves the composing text leaves the editor composing after Chromium ended the composition #9801
In Chromium, an app's editor.update() during an IME composition that moves or recreates the DOM the composition is in ends the browser's composition without a compositionend event, and the editor keeps its composition open: editor._compositionKey stays set (moved to the merged text node, or unchanged), so the editor dispatches no key commands (onKeyDown returns while editor.isComposing()) and keeps treating that node as composing. Reproduces with the playground and with a plain editor, no collaboration involved.
Steps (Chromium, IME driven with the DevTools protocol):
A paragraph See the + link Meta wiki + .; caret at Me|ta.
Input.imeSetComposition {text: 'か'}.
One editor.update(..., {discrete: true}) that unwraps the link (moves its children before it and removes it), or that moves the paragraph before the previous block.
Input.insertText {text: '漢'}.
Without step 3, the composition commits as usual (Me漢ta, compositionend fires, the composition key is cleared). With it, Chromium fires no compositionend, the commit arrives as beforeinput/inputinsertText rather than insertCompositionText, the text becomes Meか漢ta (Chromium finished the composition with か when the DOM under it changed), and editor._compositionKey stays set afterwards.
A browser-mode test.fails cell in packages/lexical-link/src/__tests__/browser/CompositionNodeReplaced.test.ts reproduces it.
Activity
[lexical-link] Chore: Pin, as a known failure, an update during an IM…
[lexical][lexical-link] Bug Fix: End the editor's composition when Ch…
[lexical-link] Chore: Pin, as a known failure, an update during an IM…
[lexical][lexical-link] Bug Fix: End the editor's composition when Ch…
[lexical-link] Chore: Pin, as a known failure, an update during an IM…
[lexical][lexical-link] Bug Fix: End the editor's composition when Ch…