-
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
Paragraph contents move to previous paragraph when deleted #8638
Comments
Another symptom of the bug:
The text from paragraph two will not be deleted, and the text from paragraph three will be moved into paragraph two. |
Copying my comment from the other issue here and reopening (it's still pretty serendipitous that both were spotted at the same time!). I think this one is actually slightly different, this is about content being merged when it should actually be deleted. My one is about nothing happening when hitting delete. Pretty sure the same code is the culprit - it seems like the event is treated as a merge when it should be a remove. (the onMerge function is called before onRemove ): gutenberg/packages/editor/src/components/rich-text/index.js Lines 439 to 463 in 98274f0
|
hello, I'm having this same issue here. When I click backspace, it goes back to the previous paragraph. I'm not a programmer or anything so I'm confused if this issue is resolved or what exactly?? |
Describe the bug
Sometimes attempting to delete the contents of a paragraph block sometimes will instead move the contents into the previous paragraph.
To Reproduce
Code Editor
mode, and paste in the following sample. Then, switch back toVisual Mode
.Highlight all of the text inside the block by clicking the mouse at the end of the text and dragging it to the beginning, by
Command+Shift+Left
, or byShift+PageUp
. Don't useControl+A
, or start at the beginning of the line, or use theDelete
key, because the bug isn't triggered in those scenarios.Hit the
Backspace
key to delete the paragraph.Expected behavior
The contents of the block should be deleted. (Maybe the block itself should be deleted too, but I'm not really concerned about that.)
Actual behavior
Rather than the contents being deleted, they're moved into the previous paragraph, so that the raw document now looks like this:
Desktop (please complete the following information):
master
@ 4fd5c20The text was updated successfully, but these errors were encountered: