Skip to content

[lexical-react] [lexical-playground] Bug Fix: Prevent typeahead menu from closing during IME composition (#7985)#7987

Merged
etrepum merged 1 commit intofacebook:mainfrom
kykim00:prevent-typeahead-close-during-ime
Nov 13, 2025
Merged

[lexical-react] [lexical-playground] Bug Fix: Prevent typeahead menu from closing during IME composition (#7985)#7987
etrepum merged 1 commit intofacebook:mainfrom
kykim00:prevent-typeahead-close-during-ime

Conversation

@kykim00
Copy link
Copy Markdown
Contributor

@kykim00 kykim00 commented Nov 13, 2025

Description

During IME composition (Korean, Japanese, Chinese), the browser creates a range selection causing selection.isCollapsed() to return false, incorrectly closing the typeahead menu.

Changes:

Add editor.isComposing() check with early return in updateListener<link to Repo facebook/lexical: packages/lexical/src/LexicalEditor.ts:806-808 />
Add E2E test for IME composition with typeahead menu
Affects MentionsPlugin, ComponentPickerPlugin, EmojiPickerPlugin.

Closes #7985

Test plan

Before

2025-11-13.2.29.11.mov

After

2025-11-13.2.27.46.mov

@vercel
Copy link
Copy Markdown

vercel bot commented Nov 13, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
lexical Ready Ready Preview Comment Nov 13, 2025 5:34am
lexical-playground Ready Ready Preview Comment Nov 13, 2025 5:34am

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Nov 13, 2025
@etrepum etrepum added the extended-tests Run extended e2e tests on a PR label Nov 13, 2025
@etrepum etrepum added this pull request to the merge queue Nov 13, 2025
Merged via the queue into facebook:main with commit 8ff3dec Nov 13, 2025
43 checks passed
@etrepum etrepum mentioned this pull request Dec 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. extended-tests Run extended e2e tests on a PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: LexicalTypeaheadMenuPlugin closes typeahead menu during IME composition

2 participants