sachinchoolur / lightGallery

A customizable, modular, responsive, lightbox gallery plugin.

Home Page:https://www.lightgalleryjs.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Infinite scrolling feature when lightGallery open

hapo-hoangnh opened this issue · comments

When lightGallery is open, the scroll position always scrolls to the bottom of the page, making Infinite scrolling function to load 1 more page. I don't want that to happen. is there any way to fix it?

Hey @hapo-hoangnh,

lightGallery reset the scroll position to where it was when lightGallery was opened. I think this behaviour might be triggering the infinite scroll function.

I'll include an option to turn off this behaviour in the next version.

i have the same, or a similar problem. under some circumstances, the page doesnt scroll up at all after closing the gallery, the screen is completely white. just after scrolling the content reappears, but the user still has to scroll up. i temporarily fixed this by adding an additional scrolltop bound to lgAfterClose - unfortunately it doesnt seem to work with lgBeforeClose - so there is the scrolling animation visible for a second after closing the gallery.

i just recently implemented the licensed version of LG - all this wasnt the case with the old free version.

so my question is: is the scrolling needed? the best solution for me would be if there is no scrolling at all, but of course i did not examine why this is the way it is.

thanks a lot!

Hey @CiReC-GmbH,

The issue has already been fixed. I'll release a new version tomorrow with the fix.

Released version 2.5.0-beta.4 with all the above updates.

Also, added an option(hideScrollbar) to hide the scrollBar entirely