Skip to content

[lexical-table] Bug Fix: Ignore SELECTION_INSERT_CLIPBOARD_NODES_COMMAND dispatched from child editors - #7637

Merged
etrepum merged 6 commits into
facebook:mainfrom
etrepum:fix-nested-editor-paste-7635
Jun 24, 2025
Merged

etrepum merged 6 commits into
facebook:mainfrom
etrepum:fix-nested-editor-paste-7635

Conversation

@etrepum

@etrepum etrepum commented Jun 21, 2025 •

Copy link
Copy Markdown
Collaborator

Description

Minimal fix for SELECTION_INSERT_CLIPBOARD_NODES_COMMAND command listeners to prevent parent editor from breaking when content is pasted into a nested editor.

See #7635 (comment) for full discussion of the root cause and more complete ways to avoid this type of problem.

Separately, as a follow-up, it would make sense to also address the issue in lexical's error handling that doesn't manage to get the editor into a working state after this error is encountered.

Closes #7635

Test plan

Added an e2e test to demonstrate that the parent editor is still responsive to edits after editing and clearing an image caption then pasting into the caption. Confirmed that this test fails if the bug fix commit is not applied.

@vercel

vercel Bot commented Jun 21, 2025 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
lexical ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 23, 2025 4:52pm
lexical-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 23, 2025 4:52pm

@facebook-github-bot facebook-github-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 Jun 21, 2025
@etrepum etrepum added extended-tests Run extended e2e tests on a PR and removed CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. labels Jun 21, 2025
@facebook-github-bot facebook-github-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 Jun 22, 2025
@johnnyoshika

Copy link
Copy Markdown

Thank you so much for this PR and attention to this matter!

@etrepum
etrepum added this pull request to the merge queue Jun 24, 2025
Merged via the queue into facebook:main with commit 035a523 Jun 24, 2025
@johnnyoshika

Copy link
Copy Markdown

Thank you for this. Any idea when a new release will be published?

@etrepum

etrepum commented Jul 1, 2025

Copy link
Copy Markdown
Collaborator Author

Nightly releases are published every weekday. Other releases are generally once a month, will be soon.

@etrepum etrepum mentioned this pull request Jul 3, 2025
fantactuka pushed a commit that referenced this pull request Aug 11, 2025

This branch was successfully deployed

2 active deployments
Preview – lexical-playground — 83a8e5ee Deployed Jun 23, 2025 by vercel[bot]
Preview – lexical — 83a8e5ee Deployed Jun 23, 2025 by vercel[bot]
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: Editor freezes when pasting text copied from websites into a nested editor state

4 participants