Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Infinite scrolling feature when lightGallery open #1296

Closed
hapo-hoangnh opened this issue May 1, 2022 · 4 comments
Closed

Infinite scrolling feature when lightGallery open #1296

hapo-hoangnh opened this issue May 1, 2022 · 4 comments

Comments

@hapo-hoangnh
Copy link

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?

@sachinchoolur
Copy link
Owner

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.

@CiReC-GmbH
Copy link

CiReC-GmbH commented May 5, 2022

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!

@sachinchoolur
Copy link
Owner

Hey @CiReC-GmbH,

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

@sachinchoolur
Copy link
Owner

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants