pawelgrzybek / siema

Siema - Lightweight and simple carousel in pure JavaScript
https://pawelgrzybek.github.io/siema/
Other
3.48k stars 411 forks source link

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

Open JulienPradet opened 9 months ago

JulienPradet commented 9 months ago

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.

pawelgrzybek commented 9 months ago

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 🫶