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

This also worked for them - thank you! Just need to try and remember to remove it when the bug is fixed :smiley:

1 Like

Hey Matej,

Quick question: Has the bug been fixed yet? Because the title says WIP and the last post was in September?
I just tested it and with Bricks 2.0.1 the “problem” still exists.

https://jam.dev/c/8b6b5871-f85a-4093-a913-daab12916ad5

Btw: Your workaround works perfectly and fixes the problem.

Best
Alex

Hi @ST90,

like you figured out, the issue was not yet resolved. For now, you still need to use a workaround.

Best regards,
Matej