-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Closed
Labels
[Feature] InserterThe main way to insert blocks using the + button in the editing interfaceThe main way to insert blocks using the + button in the editing interface[Package] Block editor/packages/block-editor/packages/block-editor[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
Relates to #70897 I believe.
I dig this a lot, but it does fail to gracefully handle a default block without a content role assigned anywhere, instead reporting true regardless of any changes.
IMO It should instead fall back to generic isUnmodifiedBlock behaviour if the specified role is not present on the block in question.
Obv simple fix is to just use the content role going forward, but this change definitely caught me flat footed and it took me a while to figure out why the block toolbar was missing from our custom paragraph blocks.
Step-by-step reproduction instructions
- create a new dummy block to use as a default without a "role": "content" prop set on any attributes, or just remove the role prop from paragraph block;
- inserter always shows, toolbar is missing unless in top toolbar mode
Screenshots, screen recording, code snippet
No response
Environment info
No response
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
Please confirm which theme type you used for testing.
- Block
- Classic
- Hybrid (e.g. classic with theme.json)
- Not sure
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
[Feature] InserterThe main way to insert blocks using the + button in the editing interfaceThe main way to insert blocks using the + button in the editing interface[Package] Block editor/packages/block-editor/packages/block-editor[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
Type
Fields
Give feedbackNo fields configured for issues without a type.
Projects
Status
✅ Done