Mouse/touch event handling improvement
- prefer passive handlers - fix event moving on touch - faster selection updates
This commit is contained in:
@@ -278,9 +278,7 @@ function startLocalDrag(init, evt) {
|
||||
}
|
||||
}
|
||||
|
||||
if (!(evt.pointerType === 'touch')) {
|
||||
evt.preventDefault()
|
||||
}
|
||||
if (evt.cancelable) evt.preventDefault()
|
||||
|
||||
window.addEventListener('pointermove', onDragPointerMove, { passive: false })
|
||||
window.addEventListener('pointerup', onDragPointerUp, { passive: false })
|
||||
@@ -486,6 +484,8 @@ function applyRangeDuringDrag(st, startDate, endDate) {
|
||||
user-select: none;
|
||||
z-index: 1;
|
||||
text-align: center;
|
||||
/* Ensure touch pointer events aren't turned into a scroll gesture; needed for reliable drag on mobile */
|
||||
touch-action: none;
|
||||
}
|
||||
|
||||
/* Inner title wrapper ensures proper ellipsis within flex/grid constraints */
|
||||
@@ -510,6 +510,7 @@ function applyRangeDuringDrag(st, startDate, endDate) {
|
||||
background: transparent;
|
||||
z-index: 2;
|
||||
cursor: ew-resize;
|
||||
touch-action: none; /* Allow touch resizing without scroll */
|
||||
}
|
||||
|
||||
.event-span .resize-handle.left {
|
||||
|
||||
Reference in New Issue
Block a user