Navigation block - undo trap when initializing 'add all pages' with existing textColor
attribute.
#33911
Closed
3 tasks done
Labels
[Block] Navigation
Affects the Navigation Block
[Block] Page List
Affects the Page List Block
[Type] Bug
An existing feature does not function as intended
Description
When a navigation block has an existing
textColor
attribute, the process to initialize via the "Add all pages" option creates an undo trap, preventing the user from being able to undo the action or any previous actions.related - #8119
Step-by-step reproduction instructions
Map tt1-blocks locally and update
block-template-parts/header.html
so that the navigation block has a "textColor" attribute. Alternatively you can activate a theme that already does this such as Mayland-blocks from https://github.com/automattic/themes. For this example, I am updating the navigation block in header.html of tt1-blocks by adding a textColor attribute like so:<!-- wp:navigation {"orientation":"horizontal","textColor":"Purple","itemsJustification":"right"} /-->
Load the site editor. You should see your header with an uninitialized navigation block.
Click the navigation block, and select the "Add all pages" option.
Try to "undo" and verify it is not possible to undo the initialization or any actions prior to it.
Undo your change to the header by removing the textColor attribute (if you instead activated Mayland-blocks as the original step, now activate tt1-blocks).
Repeat steps 2-4, and verify this time 'undo' works as expected.
Expected Behavior
Undo to work as expected:
Current Behavior
Undo is trapped in a loop:
Is there an existing issue for this?
Have you tried deactivating all plugins except Gutenberg?
Have you tried replicating the bug using a default theme e.g. Twenty Twenty?
The text was updated successfully, but these errors were encountered: