Skip to content

Commit 1d73beb

Browse files
committed
fix(RangeSlider): preventing the slider from unexpectedly altering its value when clicking on the tooltip
1 parent f538b36 commit 1d73beb

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

js/src/range-slider.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,10 @@ class RangeSlider extends BaseComponent {
149149
return
150150
}
151151

152+
if (!(event.target instanceof HTMLInputElement) && !event.target.className.includes(CLASS_NAME_RANGE_SLIDER_TRACK)) {
153+
return
154+
}
155+
152156
this._isDragging = true
153157
const clickValue = this._calculateClickValue(event)
154158
this._dragIndex = this._getNearestValueIndex(clickValue)

0 commit comments

Comments
 (0)