gutenberg icon indicating copy to clipboard operation
gutenberg copied to clipboard

Can't delete the text while renaming a block, it instead closes the dialog & deletes the block.

Open jeflopodev opened this issue 1 year ago • 0 comments

Description

I tried to rename a group block. I mistyped it and tried to delete some chars by pressing the Backspace key. The dialog then got closed on keypress, and my group block was deleted. Since I pressed it many times (to delete a few chars) the next focused blocks were deleted too. Pressing backspace once, still deletes the group block while renaming.

Step-by-step reproduction instructions

  1. While editing a template add a new group block
  2. Rename it
  3. Try to delete the text that you added in the input of the dialog by pressing the backspace.
  4. Check if the dialog is closed & the group block deleted on keypress and if further keypresses tries to delete rest of blocks.

Screenshots, screen recording, code snippet

https://github.com/WordPress/gutenberg/assets/679512/716ee330-41f8-4348-a2f7-6ad666c54f76

Environment info

  • Wordpress 6.5.3
  • Gutenberg 18.3.0
  • I tried that both in my custom theme and the Twenty Twenty-Four theme (without plugins other than Gutenberg)
  • Desktop Windows 11 23H2 22631.3527

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

jeflopodev avatar May 10 '24 01:05 jeflopodev