Skip to content

Full Site Editing: Hovering block padding and margin inputs are registered as changes #36418

@zaguiini

Description

@zaguiini

Description

Putting the mouse cursor on top of some block attributes inputs (e.g. padding, margin) enables the "Save" button on the top right, even though nothing changed.

This behavior exists because of the cover block padding and margin visualizer, introduced on #23041.

Note that we do want to keep the visualizer showing up when hovering over the input. What we don't want is to enable the "Save" button when this happens.

A possible solution would be to introduce a new piece of state that would host the visualizer settings itself, not polluting the changes object and not triggering the false alarm.

Step-by-step reproduction instructions

  1. Enable the full site editor locally;
  2. Navigate to full site editor;
  3. Select any block that has spatial settings and hover the padding or margin inputs;
  4. Check that the "Save" button is enabled.

Screenshots, screen recording, code snippet

Screen.Recording.2021-11-11.at.17.07.48.mov

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

Metadata

Metadata

Labels

[Feature] Block settings menuThe block settings screen[Priority] LowUsed to indicate that the issue at hand isn't a top priority to address and can be handled later[Status] In ProgressTracking issues with work in progress[Type] BugAn existing feature does not function as intended

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions