-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Code Editor: Commit changes upon switching editors to avoid content loss #40730
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works great, thanks for fixing so quickly!!!
Size Change: -678 B (0%) Total Size: 1.23 MB
ℹ️ View Unchanged
|
Failing tests might be related to this change. |
24592b1
to
986ae57
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks George!
@Mamaduka Is this ready to backport to WordPress 6.0 RC2, or is there still some follow-up required? I'm not sure what to make of the recent discussion :-) |
Hi, @adamziel I think this is ready for RC backport. |
I cherry-picked this PR for WordPress 6.0 RC2 with |
* Text Editor: Avoid content loss * Update method * Fix unit tests * Avoid code duplication * Back to the side effects
What?
Fixes #40575.
PR fixes content loss issue when switching between editors mode using keyboard shortcuts.
How?
Currently, blocks are only updated
onBlur
. I added a new effect to try and update them when the component unmounts.Testing Instructions