From acd62eaeccd4387e54f8e3ecc287d2c0e229d569 Mon Sep 17 00:00:00 2001
From: Terry Truong <terry06890@gmail.com>
Date: Sat, 15 Oct 2022 15:53:18 +1100
Subject: Prevent dragging cancellation when moving across elements

---
 src/components/TimeLine.vue | 4 ++++
 1 file changed, 4 insertions(+)

(limited to 'src/components/TimeLine.vue')

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);
-- 
cgit v1.2.3

