Skip to content

Commit

Permalink
fix(Slider): slider btn cannot drag in mobile device
Browse files Browse the repository at this point in the history
  • Loading branch information
Ethan Zhao committed Dec 23, 2024
1 parent 0112338 commit 69a9ca7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/slider/slider-button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ export default defineComponent({
const parentSliderSize = parentProps.sliderSize;
const { type } = event;
let { clientY, clientX } = event as MouseEvent;
if (type === 'touchstart') {
if (type === 'touchmove') {
const touch = (event as TouchEvent).touches;
[clientY, clientX] = [touch[0].clientY, touch[0].clientX];
}
Expand Down

0 comments on commit 69a9ca7

Please sign in to comment.