metafizzy / metafizzy/flickity

autoplay continues in safari when slideshow is outside of viewport

Open
#1,298 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
7.6k
Forks
593
PR merge metrics
No merged PRs in 30d

Description

I have a wraparound flickity slideshow with adaptiveHeight and autoPlay enabled.

on Chrome, when I scroll past the slideshow (with slideshow now outside/above the viewport), the slideshow stops autoscrolling (expected).
but on Safari (mac, Version 17.2.1 (19617.1.17.11.12)), the slideshow continues to autoplay, causing the content below the slideshow (the content that is visible in the viewport of the browser) to shift up and down to accommodate the adaptive height of the slideshow. how can I stop the slideshow from playing in safari when it's not in the viewport?

**Test case:** https://codepen.io/pirco/pen/bGZZyWw

https://github.com/metafizzy/flickity/assets/146350/6a689eab-81ab-4e62-8065-5edc86b804b5

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the behavior in the linked CodePen with Safari 17.2.1, focusing on the interaction between autoPlay, adaptiveHeight, and the slideshow leaving the viewport. Compare Safari with Chrome and verify that autoplay stops outside the viewport without shifting visible content; the payload does not name repository files or tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend, web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.