-
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
Undo action doesn't update block selection #12002
Comments
More context. It looks like the |
Just noting that this has been an issue for a while. We don't save any selection state to in history, neither block selection, nor rich text selection. In fact, rich text selection state is local in the RichText component. This will need some rework... I thought there was an older issue about this. |
In my opinion, this seems like something that should be looked at soon. At least make an explicit decision whether this should be part of 5.0 or not. |
I see a PR for this that then got closed, and I see the issue is in the 5.0 milestone. What's the status of this? From here it looks this belongs in post-5.0. |
This is what I've considered so far:
I'm sharing this in the hope I've missed some obvious approach that we can implement easily. cc @WordPress/gutenberg-core for feedback. |
I actually found a way that fixes the external API (the |
Is this closed now by #12214 ? Tip: You can auto-close issues by pull requests using specific keywords. |
Related: #12327 (accounting for selection in undo history) |
Not from my point of view, that's why I haven't marked it as closed. 12214 is only a workaround while this issue is not fixed. |
Which means this is a duplicate of #12327 (we should close one of them). |
Oh, I see. I assumed we were using this to track the bug, but I've now seen 12327 and it looks more implementation focused than this one. Whatever you feel is useful for not losing sight of the problem would work for me. |
Let's consolidate to #12327. I've back-referenced to this issue and reclassified it as a bug to ensure appropriate urgency. |
Note: this is easier to spot if you don't use "Unified Toolbar" mode, as the block toolbar is positioned on top of the selected block, but the same behavior applies.
Related
#11996 (reverted)#12052Steps to reproduce the behavior:
For duplication:
The expected result is that the focus was returned to the previous block.
For deletion:
The text was updated successfully, but these errors were encountered: