Closed
Description
Environment
N/A, reproduces on Snack
Description
If a slider is rendered inside a container that can scroll horizontally, the cached container X position is not cleared on scroll, which throws off the calculation in getValueFromNativeEvent
and makes the slider unusable.
One implication of this - and where it bit me - is that the component can't be used reliably inside a tab view that relies on scrolling (e.g. @react-navigation/material-top-tabs
). This manifests as sliders being completely unresponsive on all tabs except the one that was initially opened during the tab view's first render.
Reproducible Demo
https://snack.expo.dev/@motiz88/slider-horizontal-slide-bug