question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

onScrollBegin triggers on single tap but onScrollEnd does not

See original GitHub issue

Hey there, thanks for the nice library ^^

I think the behaviour for onScrollBegin and onScrollEnd should be the same once a user do a single tap on the carousel. Currently, the first one gets executed while the latter is not.

To Reproduce Steps to reproduce the behavior:

  1. Load the Carousel with required data
  2. Add onScrollBegin={() => console.log('start')} onScrollEnd={() => console.log('end')}
  3. Tap on the Carousel
  4. See ‘start’ but not ‘end’

Expected behavior Either both callbacks should be executed, OR neither of the callbacks should not be executed

Versions (please complete the following information):

  • react: v17.0.2
  • react-native: v0.68.2
  • react-native-reanimated: v2.8.0
  • react-native-reanimated-carousel: v3.0.4
  • react-native-gesture-handler: v2.2.1

Smartphone (please complete the following information):

  • Device: iPhone 13 Pro
  • OS: 15.1

Haven’t tested on other devices, my blind guess is it will work the same across all the devices but I may be terribly wrong 😃

Not sure if this is considered a bug but in our case it is because we use the both callbacks to toggle absolutely positioned elements on the screen, outside the Carousel. Any suggestions for work-arounds are welcomed ^^

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:3
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
martwetzelscommented, Dec 22, 2022

@davidwagn not with this library, I ended up implementing something myself that got the job done.

0reactions
davidwagncommented, Dec 22, 2022

@martwetzels

This is the exact issue I’m having (even came from the same SO question). Did you end up finding a solution?

Read more comments on GitHub >

github_iconTop Results From Across the Web

onscroll event not being triggered on iPad after single touch ...
According to QuirksMode Safari iPhone doesn't fire onscroll event on window , but rather on the document (and any other element).
Read more >
momentum scroll events #1021 - necolas/react-native-web
My initial thought is that if a scroll is initiated by a touch, and scroll events are still firing while there is no...
Read more >
Scroll Trigger does not seem to work on elements with hidden ...
Hello everyone! I've been trying to create a kind of paralax for a while but I'm still stuck on one thing: I can't...
Read more >
FlexScrollContainer Events
This topic provides the FlexScrollContainer widget events, doLayout, onDecelerationStarted, onScrollEnd, onScrolling, onScrollStart, onScrollTouchReleased, ...
Read more >
Gestures - React UseGesture
This looks fine on paper, but it actually won't work: the reason is that the attribute onPointerDown will overwrite the one created by...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found