-
Notifications
You must be signed in to change notification settings - Fork 270
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
Augment the hitSlop or prevent parent gesture listener to react around slider #296
Comments
Note that it is actually a problem on Android, not on iOS... |
Does anyone have a solution? I'm still looking for it... |
@zabojad Can you provide a minimal example or a part of your code? |
hey @BartoszKlonowski ! Thanks for taking the time to help me. Here is a reproducer : https://snack.expo.dev/5jW86cV70 I've not included the react-native-swiper dependency because it is actually just a ScrollView... So let me recap the issue : when nested in an horizontal ScrollView, there is no way to give the priority to the react-native-slider instance for touch events... This happens only on Android. It's fine on iOS. |
@zabojad That is a good example, thank you! |
Hej @BartoszKlonowski ! Did you find anything regarding this issue, by any chance? |
I've opened another issue in RN issue tracker. |
@zabojad Sorry for a delay, but yes, I found that this behavior is caused by a native layout structure and is typical for a native Android solutions. You created an issue in RN repository - let's see if someone will provide you with a decent solution or at least workaround, but in the worst case let's accept if the issue will be closed as the responsibility for this feature is most probably on our side. |
@BartoszKlonowski thank you for your answer. I just checked out the Android sources of this module. Can you please describe what should be done exactly? |
@BartoszKlonowski sorry to ask you again, but I could probably help on this topic if you describe me what has to be done... |
@zabojad I was trying to find a way that would not require manipulating the |
@BartoszKlonowski Could we somehow pass the slider a ref to the scrollview from js? |
@BartoszKlonowski sorry to disturb you again, could you share the details of what you've found out so that I could try to continue searching for a solution? |
@zabojad I'm back, sorry. |
was anyone able to fix this ? I am facing the same issue |
Solution that works for me, added this as a slider prop |
@ykvarts solution didn't work for me :/ |
In my case, the parent is |
thank you it works fine for me now |
Thank you so much for your solution —it worked perfectly for me! |
I'm using a slider within a swiper and it's quite hard to slide the slider without triggering the swiper.
How could I improve that situation ?
Is there some kind of hitSlop prop equivalent on the slider?
If not, how could I workaround this problem?
The text was updated successfully, but these errors were encountered: