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

Remove loading='lazy' to fix firefox scroll-to-start bug #866

Merged

Conversation

siliconfeces
Copy link
Contributor

When using infinite scroll in firefox, you can sometimes automatically scroll back to the beginning when you reach the end of an archive for the first time . This happens because of a conflict between firefox's lazy loading behavior and progress tracking.

Firefox is pretty aggressive when it comes to lazy loading, and thus only loads images when they hit the viewport (or is at least very close). Also, LRR waits until the browser has loaded all images before jumping to the current page (according to progress tracking). Therefore, in firefox, the "jump to the correct page" only fires when you reach the end of the archive.

Chrome doesn't really suffer from this, as chrome's interpretation of lazy loading is basically "lol no" and tends to just load everything eagerly.

@Difegue
Copy link
Owner

Difegue commented Oct 15, 2023

Did some quick testing on my FF install and it looks like lazy loading doesn't even work for me..
But yeah it waits for every image to be loaded, so lazyload isn't going to help in any case here. Mergin' this

@Difegue Difegue merged commit 495f7cb into Difegue:dev Oct 15, 2023
1 check passed
@siliconfeces siliconfeces deleted the fix_infinite_scroll_jumping_to_start branch October 15, 2023 15:41
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

Successfully merging this pull request may close these issues.

2 participants