Skip to content

Commit 7dee638

Browse files
Update index.tsx
Fixes an issue where if trackClickable is set to false, the adjustments for _previousLeft are not applied correctly and the scrubber jumps slightly if the thumbTouchSize is set.
1 parent cb80d87 commit 7dee638

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/index.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ export class Slider extends PureComponent<SliderProps, SliderState> {
285285
? nativeEvent.locationX - thumbSize.width
286286
: this._getThumbLeft(this._getCurrentValue(this._activeThumbIndex));
287287

288-
if (this.props.thumbTouchSize) {
288+
if (this.props.thumbTouchSize && this.props.trackClickable) {
289289
this._previousLeft -=
290290
(this.props.thumbTouchSize.width - thumbSize.width) / 2;
291291
}

0 commit comments

Comments
 (0)