Backspace key moves default block into Group block instead of deleting the default block #65850
Open
2 tasks done
Labels
[Focus] Accessibility (a11y)
Changes that impact accessibility and need corresponding review (e.g. markup changes).
[Package] Editor
/packages/editor
[Type] Bug
An existing feature does not function as intended
Description
When pressing the Backspace key (del) in the default block or in an empty paragraph, I expect the default block to be deleted and the previous block to be selected.
This works in most cases, but it doesn't work when the previous block is a Group. Note: I haven't tested with other blocks so it would be great to double check whether this inconsistent behavior happens only with the Group block os also with other ones. As an user, I'm totally confused by this inconsistent behavior. I learned that backspace is supposed to delete the empty default block but in some cases it does something different.
It is worth mentioning that at first I thought the Group block was being deleted instead of the default block. Turns out the Group block isn't deleted. Instead the default block gets moved into the Group block thus becoming a nested paragraph. As an user, this behavior is totally unexpected to me and breaks an established interaction pattern where I expect the backspace key to just delete the empty paragraph.
I think providing a consistent, predictable behavior is key to provide a cohesive user experience. The behavior of the backspace key should be standardized ans always perform the same action. Adding tests would be beneficial as well.
Animated GIF to illustrate:
Step-by-step reproduction instructions
Screenshots, screen recording, code snippet
No response
Environment info
No response
Please confirm that you have searched existing issues in the repo.
Please confirm that you have tested with all plugins deactivated except Gutenberg.
The text was updated successfully, but these errors were encountered: