WIP: Sticky not working when enabled "Expand on click" for img in Gutenberg

Browser: Chrome 110
OS: macOS / Windows / Linux / etc.
URL: https://秦半两.com/ga4安装和基础设置教程/
Video: Short screen recording that illustrates this issue (free tool: jam.dev)

I have a template for my blog page with two sidebars, both set to sticky (top: 25vh). When I edit a post in Gutenberg and use the “Expand on click” feature for any image, the sticky functionality stops working. I’ve tested this on two different websites and encountered the same issue.

Hi,

thank you for your report. I was able to replicate the issue and will add it to the internal bug tracker.

For a workaround, you can test by inducing this custom snippet on a page. Maybe you will not need that !important at the end, depends on how you add it, please test.

body:has(.wp-lightbox-overlay) #brx-content{
  overflow: auto!important;
}

Note: Please check if there is an overflow after adding this CSS.

Thanks,
M

Hi M,

Thanks.
I try this snappet, but not working. Just changed "overflow” to “unset”, it works.

Ying

Yep,
that could also work. I’m glad you solved it!

Best regards,
Matej