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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃悰Fix non-carousel scrolling on iOS 13 reverting to first slide. #24771

Merged
merged 1 commit into from Sep 27, 2019

Conversation

sparhami
Copy link

One effect of these changes is that on slow swipes, the carousel
takes longer to switch over to the snapped slide, since the scroll
momentum needs to stop before the snap instead of snapping shortly after
the touch is released.

  • Change how the snapping/scroll end is handled with respect to touch
    events and scroll.
  • As long as the user is touching, do not snap the position.
  • Do not snap after swipe is released like before, wait for scrolling
    to stop.
  • Increase the timeout after the last scroll event to be more robust.

Fixes #24541

One effect of these changes is that on slow swipes, the carousel
takes longer to switch over to the snapped slide, since the scroll
momentum needs to stop before the snap instead of snapping shortly after
the touch is released.

- Change how the snapping/scroll end is handled with respect to touch
events and scroll.
- As long as the user is touching, do not snap the position.
- Do not snap after swipe is released like before, wait for scrolling
to stop.
- Increase the timeout after the last scroll event to be more robust.
@sparhami
Copy link
Author

Pushed a version to test here: https://amp-testing-715cb.firebaseapp.com/manual/amp-carousel/0.1/slides.amp.html. Did some testing on iOS12, iOS13 and Android to make sure this change does cause any major problems.

@sparhami sparhami marked this pull request as ready for review September 26, 2019 23:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

<amp-carousel> is animating cards while user is scrolling in iOS 13 beta (Safari, Chrome & Firefox)
3 participants