-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Closed
Labels
[Block] CoverAffects the Cover Block - used to display content laid over a background imageAffects the Cover Block - used to display content laid over a background image[Status] In ProgressTracking issues with work in progressTracking issues with work in progress[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended
Description
Description
The padding/margin UI is being stored in the block attributes under style.visualizers
, so if you save while hovered over the padding input, the UI persists upon reloading.
<!-- wp:cover {"url":"https://placekitten.com/500/500","id":1,"align":"center","style":{"spacing":{"padding":{"top":"128px","right":"128px","bottom":"128px","left":"128px"}},"visualizers":{"padding":{"top":true,"right":true,"bottom":true,"left":true}}}} -->
<div class="wp-block-cover aligncenter has-background-dim" style="padding-top:128px;padding-right:128px;padding-bottom:128px;padding-left:128px">
<img class="wp-block-cover__image-background wp-image-1" alt="" src="https://placekitten.com/500/500" data-object-fit="cover"/>
<div class="wp-block-cover__inner-container">
<!-- wp:spacer -->
<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>
<!-- /wp:spacer -->
</div>
</div>
<!-- /wp:cover -->
Step-by-step reproduction instructions
- Create a cover block
- Add some padding
- While hovering on the padding input, save the document with the save shortcut, command+s/control+s
- Reload the page
Screen recording
Metadata
Metadata
Assignees
Labels
[Block] CoverAffects the Cover Block - used to display content laid over a background imageAffects the Cover Block - used to display content laid over a background image[Status] In ProgressTracking issues with work in progressTracking issues with work in progress[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended