Lightbox: The right position of the close button is incorrect on Windows OS #56052
Labels
[Block] Image
Affects the Image Block
Needs Testing
Needs further testing to be confirmed.
OS Issues
Issues or PRs that are related to OS specific problems
[Status] In Progress
Tracking issues with work in progress
[Type] Bug
An existing feature does not function as intended
Description
On Windows OS, when opening Lightbox with a document that has a scroll bar, the right position of the close button is incorrect.
The button position should be 16px from the right edge as defined by this CSS.
However, the width of the overlay, which is the reference for the position of the close button, is
100vw
, so the width includes the scrollbar.As a result, the close button's right position no longer takes into account the width of the scrollbar.
I tried CSS like below to solve this problem:
If you apply
right: 0
, the overlay width will fit inside the scrollbar. However, when the lightbox is closed, there is a slight unnatural shift, so a different approach is needed.d0715020d00d72340f54b784deb01278.mp4
Step-by-step reproduction instructions
Note: This problem would only be reproducible on Windows OS where the browser scrollbars have a physical width.
Screenshots, screen recording, code snippet
No response
Environment info
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: