When using the Image block with “Enlarge on click” enabled, the page becomes unscrollable after closing the lightbox, but only on the first page load. After a browser reload, the issue no longer occurs.
I investigated this myself and found a JavaScript console error coming from WordPress core, which prevents the scroll-unlock logic from running.
Steps to Reproduce
- Open a page with large images using the Image block
- Ensure “Enlarge on click” is enabled
- Scroll down the page
- Click an image to open it in the lightbox
- Close the image
- Try to scroll the page
Issue Source: https://wordpress.org/support/topic/enlarge-on-click-page-scroll-issue/
Screenshot:

When using the Image block with “Enlarge on click” enabled, the page becomes unscrollable after closing the lightbox, but only on the first page load. After a browser reload, the issue no longer occurs.
I investigated this myself and found a JavaScript console error coming from WordPress core, which prevents the scroll-unlock logic from running.
Steps to Reproduce
Issue Source: https://wordpress.org/support/topic/enlarge-on-click-page-scroll-issue/
Screenshot:
