Opened 3 months ago
Closed 3 months ago
#64450 closed defect (bug) (reported-upstream)
Image block “Enlarge on click” throws JS error and locks page scrolling on first load
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Priority: | normal | |
| Severity: | major | Version: | |
| Component: | General | Keywords: | |
| Focuses: | Cc: |
Description
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
- 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
Attachments (1)
Change History (3)
#1
@
3 months ago
- Summary changed from Image block “Enlarge on click” throws JS error and locks page scrolling on first load #74184 to Image block “Enlarge on click” throws JS error and locks page scrolling on first load
#2
@
3 months ago
- Milestone Awaiting Review deleted
- Resolution set to reported-upstream
- Status changed from new to closed
The bug was already reported in the correct directory - https://github.com/WordPress/gutenberg/issues/74184.
There's no need to create multiple issues/tickets.
Note: See
TracTickets for help on using
tickets.
It looks like the error is coming from this WordPress core file:
/wp-includes/js/dist/script-modules/block-library/image/view.min.js
This file controls the Image block “Enlarge on click” feature.