-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Closed
Closed
Copy link
Labels
[Feature] Block APIAPI that allows to express the block paradigm.API that allows to express the block paradigm.[Feature] Nested / Inner BlocksAnything related to the experience of nested/inner blocks inside a larger container, like Group or PAnything related to the experience of nested/inner blocks inside a larger container, like Group or P[Priority] HighUsed to indicate top priority items that need quick attentionUsed to indicate top priority items that need quick attention[Status] In ProgressTracking issues with work in progressTracking issues with work in progress[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended
Description
Description
If the delete key or keyboard shortcut is used to delete the first item in an InnerBlocks list an exception is thrown. Using the 'Remove block' menu option for the block works as expected. Using the delete key for any block other than the first one also works as expected.
This issue can be replicated with the Navigation block, and also on the gallery block refactor PR
Step-by-step reproduction instructions:
- Add a Navigation block and add several child navigation items to it.
- Select the first item in the navigation and hit delete key to remove
- Block shows unable to preview message and exception in console
Code snippet
Exception is thrown at https://github.com/WordPress/gutenberg/blob/trunk/packages/block-editor/src/components/block-list/use-block-props/index.js#L86
For some reason the useBlockProps hook for the block that has been deleted gets stuck in a loop and throws an exception when trying to get the title of the block that is now deleted.
andrewmumblebee and walkersands
Metadata
Metadata
Assignees
Labels
[Feature] Block APIAPI that allows to express the block paradigm.API that allows to express the block paradigm.[Feature] Nested / Inner BlocksAnything related to the experience of nested/inner blocks inside a larger container, like Group or PAnything related to the experience of nested/inner blocks inside a larger container, like Group or P[Priority] HighUsed to indicate top priority items that need quick attentionUsed to indicate top priority items that need quick attention[Status] In ProgressTracking issues with work in progressTracking issues with work in progress[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended