Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[lexical] Bug Fix: Set activeEditorState when using editor.setEditorState inside of an update #7034

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

etrepum
Copy link
Collaborator

@etrepum etrepum commented Jan 9, 2025

Description

When you use editor.setEditorState from inside of an update, the change was not visible until the next deferred update or reconciliation

Closes #6876

Test plan

Before

If you issued a setEditorState you wouldn't be able to observe its effect until after the update function

After

Unit tests verify the expected behavior

@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 Jan 9, 2025
Copy link

vercel bot commented Jan 9, 2025

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 Jan 9, 2025 5:45pm
lexical-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 9, 2025 5:45pm

Copy link

github-actions bot commented Jan 9, 2025

size-limit report 📦

Path Size
lexical - cjs 31.41 KB (0%)
lexical - esm 31.24 KB (0%)
@lexical/rich-text - cjs 40.49 KB (0%)
@lexical/rich-text - esm 33.16 KB (0%)
@lexical/plain-text - cjs 39.05 KB (0%)
@lexical/plain-text - esm 30.37 KB (0%)
@lexical/react - cjs 42.33 KB (0%)
@lexical/react - esm 34.42 KB (0%)

@etrepum etrepum marked this pull request as draft January 9, 2025 18:17
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants