[wp-trac] [WordPress Trac] #64450: Image block “Enlarge on click” throws JS error and locks page scrolling on first load #74184

WordPress Trac noreply at wordpress.org
Tue Dec 23 12:56:50 UTC 2025


#64450: Image block “Enlarge on click” throws JS error and locks page scrolling on
first load #74184
---------------------------+-----------------------------
 Reporter:  mehrazmorshed  |      Owner:  (none)
     Type:  defect (bug)   |     Status:  new
 Priority:  normal         |  Milestone:  Awaiting Review
Component:  General        |    Version:
 Severity:  major          |   Keywords:
  Focuses:                 |
---------------------------+-----------------------------
 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.

 It generates a JavaScript console error coming from WordPress core, which
 prevents the scroll-unlock logic from running.

 **Steps to Reproduce
 **
 1. Open a page with large images using the Image block
 2. Ensure “Enlarge on click” is enabled
 3. Scroll down the page
 4. Click an image to open it in the lightbox
 5. Close the image
 6. Try to scroll the page

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/64450>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list