diff --git a/packages/frontend-2/components/viewer/anchored-point/Thread.vue b/packages/frontend-2/components/viewer/anchored-point/Thread.vue index f98e57d77..e67c829b7 100644 --- a/packages/frontend-2/components/viewer/anchored-point/Thread.vue +++ b/packages/frontend-2/components/viewer/anchored-point/Thread.vue @@ -37,20 +37,18 @@ >
-
-
+
+
- - + /> -
-
- - - -
-
-
-
- {{ bannerText }} -
-
- - {{ bannerButton.text }} - -
-
-
-
- -
-
- {{ isTypingMessage }} -
-
- -
+
+
+ + + +
+
+
+
+ {{ bannerText }} +
+
+ - Reply in Speckle + {{ bannerButton.text }}
+
+
+
+ +
- - Reply - + {{ isTypingMessage }}
+ +
+ + Reply in Speckle + +
+
+ + Reply + +
@@ -322,9 +318,19 @@ const { x, y, isDragging, position } = useDraggable(threadContainer, { handle, initialValue: initialDragPosition, onStart(_pos, event) { - // Only allow dragging by border + // Only allow dragging from header, but not from interactive elements const target = event.target as HTMLElement - if (target !== handle.value) return false + + // Check if target is the handle or contained within it + const isWithinHandle = target === handle.value || handle.value?.contains(target) + if (!isWithinHandle) return false + + // Prevent dragging when clicking on buttons or other interactive elements + const isInteractiveElement = + target.closest('button') || + target.closest('a') || + target.closest('[role="button"]') + if (isInteractiveElement) return false // Reset pos, if starting dragging from scratch if (!isDragged.value) position.value = { x: 0, y: 0 }