Skip to content

fix(richtext-lexical): ensure state is up-to-date on inline-block restore #12128

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

tak-amboss
Copy link
Contributor

@tak-amboss tak-amboss commented Apr 16, 2025

What?

Ensures that the initial state on inline blocks gets updated when an inline block gets restored from lexical history.

Why?

If an inline block got edited, removed, and restored (via lexical undo), the state of the inline block was taken from an outdated initial state and did not reflect the current form state, see screencast

Screen.Recording.2025-04-16.at.11.42.50.mov

How?

We now ensure that the initial state gets re-initialized after the component got unmounted, resulting in the expected behavior:

Screen.Recording.2025-04-16.at.12.56.04.mov

@tak-amboss tak-amboss changed the title fix(lexical): ensure state is up-to-date on inline-block restore fix(richtext-lexical): ensure state is up-to-date on inline-block restore Apr 16, 2025
@GermanJablo GermanJablo self-requested a review April 16, 2025 15:12
@GermanJablo GermanJablo self-assigned this Apr 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants