Resolved

Bug Report: Undo (Ctrl+Z) fails to revert CSS/Style attributes on Container blocks

2

Hi Greenshift Team,

I would like to report an issue regarding the Undo (Ctrl+Z / Cmd+Z) behavior in the Gutenberg editor when working with Greenshift blocks.

Issue Summary: While standard Gutenberg actions (such as editing plain text in Heading/Text blocks or deleting/moving a Container box) correctly revert upon pressing Undo, changes made to CSS/style properties on advanced blocks do not revert.

Steps to Reproduce:

  1. Add a Greenshift Container / Row block to the editor.
  2. Open the sidebar settings and add a border (e.g., solid 2px black) or modify spacing/styling.
  3. Press Ctrl+Z (or Cmd+Z) to undo the change.

Observed Behavior: The border style remains applied on the canvas (and/or the style generator fails to re-render to the previous state), meaning the visual CSS change is not reverted.

Expected Behavior: Pressing Undo should immediately revert both the inspector control values and the dynamically rendered CSS rules back to their previous state.

It seems the undo stack properly tracks core block tree events and text mutations, but the custom CSS attribute updates/dynamic style generation bypass or desync from the @wordpress/data history stack.

Could you please look into how style attributes and dynamic CSS re-rendering hook into the editor’s undo history?

Thanks for your support!

Elena Ramondetti

Replies

Responses

  1. Elena Ramondetti Avatar
    Elena Ramondetti
    Member

    The issue also affects block deletion. When deleting a Greenshift Container or advanced element, pressing Undo (Ctrl+Z / Cmd+Z) frequently fails to restore the deleted block. It appears that actions within Greenshift components either pollute the history stack with hidden attribute updates or break the @wordpress/data undo queue entirely.

  2. Tested – not confirmed. Both styles and deletion is reverted on CTRL+Z

    https://cleanshot.com/share/2wfqsxWn