File tree Expand file tree Collapse file tree 2 files changed +14
-4
lines changed
Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -372,6 +372,11 @@ const startDragging = (event) => {
372372 if (! props .enableSelectionDrag ) return ;
373373
374374 const isTouch = event .type === ' touchstart' ;
375+
376+ if (! isTouch) {
377+ event .stopPropagation ();
378+ }
379+
375380 const touch0 =
376381 isTouch && event .targetTouches && event .targetTouches [0 ] ? event .targetTouches [0 ] : null ;
377382 const target = isTouch ? (touch0 ? touch0 .target : null ) : event .target ;
Original file line number Diff line number Diff line change @@ -436,6 +436,11 @@ const startDragging = (event) => {
436436 if (! props .enableSelectionDrag ) return ;
437437
438438 const isTouch = event .type === ' touchstart' ;
439+
440+ if (! isTouch) {
441+ event .stopPropagation ();
442+ }
443+
439444 const touch0 = isTouch && event .targetTouches && event .targetTouches [0 ] ? event .targetTouches [0 ] : null ;
440445 const target = isTouch ? (touch0 ? touch0 .target : null ) : event .target ;
441446
@@ -445,10 +450,10 @@ const startDragging = (event) => {
445450 isDragging .value = true ;
446451 initialMouseX .value = isTouch ? (touch0 ? touch0 .clientX : 0 ) : event .clientX ;
447452
448- activeMoveEvent = isTouch ? ' touchmove' : ' mousemove' ;
449- activeEndEvent = isTouch ? ' touchend' : ' mouseup' ;
450- activeMoveHandler = isTouch ? handleTouchDragging : handleDragging;
451- activeEndHandler = isTouch ? stopTouchDragging : stopDragging;
453+ activeMoveEvent = isTouch ? ' touchmove' : ' mousemove' ;
454+ activeEndEvent = isTouch ? ' touchend' : ' mouseup' ;
455+ activeMoveHandler = isTouch ? handleTouchDragging : handleDragging;
456+ activeEndHandler = isTouch ? stopTouchDragging : stopDragging;
452457
453458 window .addEventListener (activeMoveEvent, activeMoveHandler, { passive: false });
454459 window .addEventListener (activeEndEvent, activeEndHandler);
You can’t perform that action at this time.
0 commit comments