Mouse/touch event handling improvement

- prefer passive handlers
- fix event moving on touch
- faster selection updates
This commit is contained in:
2025-08-27 20:04:29 +00:00
parent 1dcf4658bd
commit 45b95fc67c
6 changed files with 19 additions and 23 deletions
+4 -3
View File
@@ -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 {