Gallery v1: Allow clicks within replace media placeholder state#36804
Merged
andrewserong merged 1 commit intotrunkfrom Nov 24, 2021
Merged
Gallery v1: Allow clicks within replace media placeholder state#36804andrewserong merged 1 commit intotrunkfrom
andrewserong merged 1 commit intotrunkfrom
Conversation
|
Size Change: -8 B (0%) Total Size: 1.1 MB
ℹ️ View Unchanged
|
This was referenced Nov 24, 2021
glendaviesnz
approved these changes
Nov 24, 2021
Contributor
glendaviesnz
left a comment
There was a problem hiding this comment.
This tested well for me. Should this be cherry picked for 5.9 also ?
Contributor
Author
Yes, I believe it should. I've just added the Backport to WP Beta/RC label 👍. Thanks for testing, Glen! |
noisysocks
pushed a commit
that referenced
this pull request
Nov 29, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
While testing #36191, I noticed that if I use the replace media flow in the v1 Gallery block, then the buttons in the image's placeholder state cannot be clicked. This appears to be because the
::beforecontent (withz-index: 1) is preventing clicks to the elements beneath it. The fix is to addpointer-events: noneto this content so that it doesn't prevent clicks from reaching the target elements.How has this been tested?
To use the v1 version of the Gallery block, set
use_balanceTagsoption to1for your test site. If you're usingwp-env, you can do so by running:Add a gallery block to a post or page and select a few images. Click on one of the images and select the button to replace the image. With this PR applied, you should be able to replace the image.
Screenshots
Types of changes
Bug fix (non-breaking change which fixes an issue)
Checklist:
*.native.jsfiles for terms that need renaming or removal).