-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
[G2] Block mover is not clickable or draggable on full-width blocks #20451
Comments
Yes same here |
CC: @youknowriad do you have any insights on how to address this? |
Nothing in particular, seems more like a z-index issue. I also wonder why it's just in full width, so maybe more a CSS to remove somewhere. |
Yeah,
seems to fix this issue. |
@lgersman I'm not sure I understand that fix yet but please consider opening a PR :) |
Fixes #20451. Props @lgersman for advice. The mover control did not work for full-wide images. I'm honestly surprised it worked in wide and normal settings, because the z-index was -1 meaning it shouldn't be. I suspect it's because the layout canvas has padding left and right that somehow interferes with things here, but couldn't verify. However the negative z index wasn't a good fix in the first place. The reason it was there, was to make sure that when the mover control animates out, it appears to be coming from "beneath" the block toolbar. The z-index put it below the entire block toolbar, which is the container that has a background color. This PR changes things so the mover control does not have a z-index, but the switcher button has been elevated, and been given a white background color to cover it.
I created a fix in #21097. |
Fixes #20451. Props @lgersman for advice. The mover control did not work for full-wide images. I'm honestly surprised it worked in wide and normal settings, because the z-index was -1 meaning it shouldn't be. I suspect it's because the layout canvas has padding left and right that somehow interferes with things here, but couldn't verify. However the negative z index wasn't a good fix in the first place. The reason it was there, was to make sure that when the mover control animates out, it appears to be coming from "beneath" the block toolbar. The z-index put it below the entire block toolbar, which is the container that has a background color. This PR changes things so the mover control does not have a z-index, but the switcher button has been elevated, and been given a white background color to cover it.
Fixes #20451. Props @lgersman for advice. The mover control did not work for full-wide images. I'm honestly surprised it worked in wide and normal settings, because the z-index was -1 meaning it shouldn't be. I suspect it's because the layout canvas has padding left and right that somehow interferes with things here, but couldn't verify. However the negative z index wasn't a good fix in the first place. The reason it was there, was to make sure that when the mover control animates out, it appears to be coming from "beneath" the block toolbar. The z-index put it below the entire block toolbar, which is the container that has a background color. This PR changes things so the mover control does not have a z-index, but the switcher button has been elevated, and been given a white background color to cover it.
Description
Following the amazing work from #19348, I encountered a small issue: the block mover isn't clickable or draggable on blocks that are set to full-width, e.g. the image, gallery, cover, group, and columns block. The mover appears and renders the correct contextual state, but just isn't clickable.
It appears to be a stacking order issue; I briefly tested manually adding a positive
z-index
to any of the container elements (e.g..block-editor-block-toolbar__mover-switcher-container
), and this allowed the mover to be clickable + draggable.To reproduce
Environment
The text was updated successfully, but these errors were encountered: