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.
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Please confirm which theme type you used for testing.
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
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.
Please confirm which theme type you used for testing.