lokesh / lightbox2

THE original Lightbox script (v2).
http://lokeshdhakar.com/projects/lightbox2/
MIT License
6.2k stars 1.77k forks source link

Viewport jumps to top of page #753

Open ov2k opened 3 months ago

ov2k commented 3 months ago

This is superficially similar to #668. When I click on a thumbnail, the viewport will sometimes jump to the top of the page. This is troublesome when disableScrolling: true. By sometimes, I mean that it seems to only occur when the viewport is scrolled at or near the bottom of the page. When the viewport is far enough above the bottom of the page, the problem does not occur.

I'm using lightbox2 v2.11.4. I've only observed this on Safari on iOS 17.5.1. It does not seem to affect Chrome or Firefox on Windows 10.

The workaround described in #668 works here as well. For now, you can see this at http://artwork.norman.soong.info, but I will probably implement the workaround at some point.

ov2k commented 3 months ago

I implemented the workaround, but left the old version intact at http://artwork.norman.soong.info/issue753.