Skip to content

Not all styles panels are visually updated on copy/paste block styles #47368

@ndiego

Description

@ndiego

Description

Not all pasted styles are "visually" applied in the inspector panel when copying and pasting block styles. The styles are technically applied to the block, but tools that were not already applied to a styles panel, do not get updated. If you deselect the block and then reselect, all styles panels are correctly updated.

Step-by-step reproduction instructions

  1. Add a heading block and add many custom styles to it, including padding and margin.
  2. Add another unstyled heading block.
  3. Copy the styles for the first heading to the unstyles heading block.
  4. See that the applied padding and margin styles do not show up in the Dimensions panel even though they are applied to the block. If you look closely, you will also see that only Typography tools that were already applied to the unstyled heading block get updated.
  5. Click off of the block and then reselect. See that the Dimensions panel is displaying as expected.

Screenshots, screen recording, code snippet

copy-past-styles-error

Environment info

  • WordPress 6.1.1
  • Gutenberg trunk
  • TT3

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] BlocksOverall functionality of blocks[Type] BugAn existing feature does not function as intended

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions