aboutsummaryrefslogtreecommitdiff
path: root/src/components
diff options
context:
space:
mode:
authorTerry Truong <terry06890@gmail.com>2022-10-15 15:53:18 +1100
committerTerry Truong <terry06890@gmail.com>2022-10-15 15:53:18 +1100
commitacd62eaeccd4387e54f8e3ecc287d2c0e229d569 (patch)
tree71ff5f921a58ab4be902c32c773114239863c183 /src/components
parent0c8b0a7513ccf457556db1486beb092265c594a3 (diff)
Prevent dragging cancellation when moving across elements
Diffstat (limited to 'src/components')
-rw-r--r--src/components/TimeLine.vue4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/components/TimeLine.vue b/src/components/TimeLine.vue
index 281f4e4..d8978e4 100644
--- a/src/components/TimeLine.vue
+++ b/src/components/TimeLine.vue
@@ -598,6 +598,10 @@ function onPointerMove(evt: PointerEvent){
pointerY = evt.clientY;
}
function onPointerUp(evt: PointerEvent){
+ // Ignore if dragging between div elements
+ if (evt.relatedTarget != null && rootRef.value.contains(evt.relatedTarget)){
+ return;
+ }
// Remove from event cache
const index = ptrEvtCache.findIndex((e) => e.pointerId == evt.pointerId);
ptrEvtCache.splice(index, 1);