Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Padding UI can persist on save #31839

Closed
ajlende opened this issue May 14, 2021 · 3 comments
Closed

Padding UI can persist on save #31839

ajlende opened this issue May 14, 2021 · 3 comments
Assignees
Labels
[Block] Cover Affects the Cover Block - used to display content laid over a background image [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended

Comments

@ajlende
Copy link
Contributor

ajlende commented May 14, 2021

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

  1. Create a cover block
  2. Add some padding
  3. While hovering on the padding input, save the document with the save shortcut, command+s/control+s
  4. Reload the page

Screen recording

padding-ui-persist-on-save

@Mamaduka
Copy link
Member

Mamaduka commented Jul 7, 2022

Hi, @ajlende

Do you think we can close this one now that #40505 is merged?

@ndiego
Copy link
Member

ndiego commented Jul 19, 2022

I have tested, and this is no longer an issue in the latest version of Gutenberg. I believe this can be closed.

@t-hamano
Copy link
Contributor

I tested again, and it didn't reproduce in the latest Gutenberg.

I would like to close this issue as it should have been resolved by #40505.
(The PR was merged in 13.2, so it’s not include in WP 6.0)

Here are the test results:

WordPress 6.0.1 without Gutenberg (Reproduced)

without_gutenberg.mp4

WordPress 6.0.1 with Gutenberg 13.7.0 (Not reproduced)

b90733b08b7bf30b1026f09cfe7a99c8.mp4

The visualizer was limited to a display time, so I tried to save while moving the mouse up/down, but there was no problem.

f9ceeabca2616521c1b2373f3b069629.mp4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Cover Affects the Cover Block - used to display content laid over a background image [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants