-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Writing flow: cannot keyboard delete paragraphs with preceding Columns/Group #45436
Comments
I tested and was able to reproduce this with:
|
I am able to reproduce this with 6.1 but not 5.9.5. I believe this trac issue is a duplicate: core trac 57010.
|
Is there any update on this issue, @vcanales ? |
@priethor, I haven't been able to crack this one yet; it's a bit of a head-scratcher since it involves going deep into parts of Gutenberg state management that I haven't explored yet. I might need to tap into some other minds on this. I'm wondering, though, where it would be best to bring it up. I'll raise the issue in the Making WordPress Slack before the next meeting, but I'd appreciate any other suggestions. |
The problem here is that, when we try to merge two blocks, we attempt to convert the selected block to the block we're trying to merge into, and then merge its inner blocks. For example, when you merge a paragraph or heading into a quote, we convert the paragraph or heading to a quote, and then merge those two quotes. Now in the case of Columns this is interesting: we convert the paragraph to a Columns block (which is possible since there's a transform), and then we merge these two Columns blocks together. It's a bit strange but not totally weird. The reason why it looks broken is each Column block having a width attribute, and those are not correct after merging. E.g. 50/50 becomes 50/50/100. Now there's several solutions here:
|
Description
When the
backspace
key is pressed in an empty paragraph block or heading block, the block is deleted and the focus is shifted to the previous block. I think this is the expected behavior.However, in WordPress 6.1(with or without Gutenberg ) if the block is preceded by a group or column, the block is not deleted, but wrapped in the previous block.
I think this is a bug, not an expected change.
Step-by-step reproduction instructions
See screencast.
Screenshots, screen recording, code snippet
WordPress 6.0
6.0.mp4
WordPress 6.1
wp6.1.mp4
Environment info
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: