Skip to content

Commit

Permalink
chore(Slider): avoid triggering scrolling on touch
Browse files Browse the repository at this point in the history
  • Loading branch information
nooooooom committed Nov 14, 2021
1 parent d5d5f6f commit af31772
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/slider/src/Slider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -449,9 +449,9 @@ export default defineComponent({
activeIndexRef.value = activeIndex

if (activeIndex !== -1) {
// avoid triggering scrolling on touch
event.preventDefault()
draggingRef.value = true

if (!isTouchEvent(event)) event.preventDefault()
focusActiveHandle(activeIndex)
doDispatchValue(
sanitizeValue(pointValue, mergedValuesRef.value[activeIndex]),
Expand Down

0 comments on commit af31772

Please sign in to comment.