`allowTouchTrack` Slider thump position is off when sliding
See original GitHub issueExplain what you did (Required)
I am using the Slider
component. I was upgrading from version 2.0.4
to 2.2.1
in order to access the new allowTouchTrack
prop. Before this upgrade, when sliding, the thumb was at the exact same position of the finger.
Expected behavior (Required)
The behaviour hasn’t changed.
Describe the bug (Required)
The bug is, that the slider’s thumb position is a bit ahead of the actual click/grab position. See the video below.
To Reproduce (Required)
We highly recommend that you re-create the bug on Snack. If not, list the steps that a reviewer can take to reproduce the behaviour:
By any means, I am willing to create a reproduction. I am not sure whether this bug is at your attention currently, or whether this is something specific that happens on my side. I will create a reproduction in the next 24 hours. Would be interesting to know meanwhile, whether this happens to other users as well.
When turning the prop allowTouchTrack
on, the behaviour occurs. When turning it off everything is okay again.
Screenshots (Required) Video link
Your Environment (Required):
software | version |
---|---|
react-native-elements | 2.2.1 |
react-native | 0.63.2 |
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (2 by maintainers)
Top GitHub Comments
Okay, reproduction is super simple: just create a slider and set the allowTouchTrack prop:
https://snack.expo.io/@hannojg/allowtouchtrack-bug
Hi @hannojg that’s the intended behaviour. If you press and hold and drag the slider will change as this is the intended behaviour of the Pan Gesture Handler.
What could have been a bug? If the slider responds outside its area.
The area of response is equal to the height.
Try this on the Playground Here -> https://react-native-elements.js.org/#/slider
Paste the below code.