-
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
Focus: Fix focus jumps when splitting a text block #480
Conversation
Just the Neither one of these fixes feels like a great solution to me; it would be better to find the specific event(s) that cause the focus to jump, and then remove/suppress those. |
@nylen I know these are not ideal but it's really hard to solve. 1- the gutenberg/editor/modes/visual-editor/block.js Line 104 in e783575
START_TYPING event happened before splitting the content.
2- the |
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.
I see, thanks for explaining. I think we should merge it
@aduth I already noticed this, but it was not the intent of this PR to fix this bug. It's caused by the fact that we're triggering two consecutive Redux Actions which triggers two rerenders. I was thinking of batching redux subscribtions to resolve this in a transparent way. https://github.com/tappleby/redux-batched-subscribe |
We have to be very careful while dealing the with the different TinyMCE events. Triggering unnecessary events can make the focus jump to other blocks.
Testing instructions