Skip to content

Commit

Permalink
fix(RangeSlider): preventing the slider from unexpectedly altering it…
Browse files Browse the repository at this point in the history
…s value when clicking on the tooltip
  • Loading branch information
mrholek committed Dec 25, 2024
1 parent f538b36 commit 1d73beb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions js/src/range-slider.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,10 @@ class RangeSlider extends BaseComponent {
return
}

if (!(event.target instanceof HTMLInputElement) && !event.target.className.includes(CLASS_NAME_RANGE_SLIDER_TRACK)) {
return
}

this._isDragging = true
const clickValue = this._calculateClickValue(event)
this._dragIndex = this._getNearestValueIndex(clickValue)
Expand Down

0 comments on commit 1d73beb

Please sign in to comment.