-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Clicking Wide or Full alignment makes the Image block jump #12292
Comments
Thanks for a very solid ticket with even a suggested fix. However that fix won't do it. When removing the position relative, this happens: Due to the change we recently made to TwentyNineteen this wasn't easily discoverable, but as you ticketed yourself in WordPress/twentynineteen#665 that behavior might need a revisit. Basically we need the block movers to be available also for fullwide images. I will see if I can find another fix. |
Fixes #12292. This PR fixes an issue where the block toolbar would cause an image to jump downwards when the wide or fullwide buttons were pressed. Recently as part of a floats refactor, we also refactored how the block toolbar worked. This meant the removal of a floats rule to the toolbar itself, because it was both unnecessary and interfered with adjacent floats. This PR restores that rule, but for wide and fullwide only, fixing the regression.
Ah, I see, that's with Twenty Seventeen and the toolbar docked to the block left edge. Right. |
Submitted fix in #12305. |
Fixes #12292. This PR fixes an issue where the block toolbar would cause an image to jump downwards when the wide or fullwide buttons were pressed. Recently as part of a floats refactor, we also refactored how the block toolbar worked. This meant the removal of a floats rule to the toolbar itself, because it was both unnecessary and interfered with adjacent floats. This PR restores that rule, but for wide and fullwide only, fixing the regression.
Fixes #12292. This PR fixes an issue where the block toolbar would cause an image to jump downwards when the wide or fullwide buttons were pressed. Recently as part of a floats refactor, we also refactored how the block toolbar worked. This meant the removal of a floats rule to the toolbar itself, because it was both unnecessary and interfered with adjacent floats. This PR restores that rule, but for wide and fullwide only, fixing the regression.
Tested with Twenty Nineteen because it supports "Wide" or "Full" alignments.
When clicking the "Wide" or "Full" alignment buttons in an Image block, the image "jumps" a bit down, even though there's no apparent reason for the extra space to exist. Here's a GIF:
This seems to happen only on the Image block. Doesn't happen on other blocks that support wide and full alignment, e.g. Columns, Cover, Gallery.
As far as I can tell, the jump is caused by one single line of CSS:
position: relative
here:gutenberg/packages/edit-post/src/components/visual-editor/style.scss
Lines 32 to 41 in b5a709f
To my understanding, especially after #7365, the toolbar should be completely pulled out from the layout flow. That's the reason why it normally uses
position: absolute
.However, with a wide or full alignment, it gets
position: relative;
so it still takes some space in the layout.Pushing a PR to remove
position: relative;
would be trivial and in my testing it would fix the issue. However, I'm not sure if there are other reasons forposition: relative;
. /Cc @jasmussenThe text was updated successfully, but these errors were encountered: