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

Do not reload carousel on scroll down on mobile devices #299

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

JulienPradet
Copy link

Address bar is hidden on scroll down on most mobile devices, which triggers a resize event. However Siema does not rely on height, hence the resize event should be ignored to avoid recreating the DOM for nothing.

This is important for any carousel that relies on DOM construction (ex: videos).

I'm aware that the repo is not actively maintained, but sending this PR in case in can still be of help to others.

Address bar is hidden on scroll down on most mobile devices, which
triggers a resize event. However Siema does not rely on height, hence
the resize event should be ignored to avoid recreating the DOM for nothing.

This is important for any carousel that relies on DOM construction (ex: videos)
@pawelgrzybek
Copy link
Owner

Yeah, I have no intention to maintain this repo, but I really appreciate your contribution here @JulienPradet ! I may merge this one and few other upvoted PRs and release a minor release at some point, so I am glad that you opened this PR.

Have a fab day 🫶

Copy link

@Lemon2311 Lemon2311 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The pull request indeed appropriately halts carousel DOM reconstruction on mobile scroll by ignoring resize events when the width is unchanged

marceloberwanger added a commit to marceloberwanger/siema that referenced this pull request Feb 15, 2024
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.

None yet

4 participants