Skip to content

Commit cc4beb1

Browse files
committed
Atoms - Slicer - Fix vertical scroll freeze when touch dragging minimap
1 parent 7e9cca6 commit cc4beb1

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/atoms/Slicer.vue

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,18 @@ function handleTouchDragging(event) {
362362
if (event.target.classList.contains('range-handle')) {
363363
return;
364364
}
365-
event.preventDefault();
365+
366+
const touch = event.targetTouches[0];
367+
const deltaY = Math.abs(touch.clientY - initialMouseX.value);
368+
369+
if (deltaY > dragThreshold.value) {
370+
// Allow vertical scroll
371+
return;
372+
}
373+
374+
if (event.cancelable) {
375+
event.preventDefault();
376+
}
366377
updateDragging(event.targetTouches[0].clientX);
367378
};
368379

0 commit comments

Comments
 (0)