From 37a688c874f38e53a3b471c2936659b082084510 Mon Sep 17 00:00:00 2001 From: mathuo <6710312+mathuo@users.noreply.github.com> Date: Mon, 17 Jul 2023 19:49:37 +0100 Subject: [PATCH] fix: limit drag handle scope --- packages/dockview-core/src/dockview/dockviewComponent.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/dockview-core/src/dockview/dockviewComponent.ts b/packages/dockview-core/src/dockview/dockviewComponent.ts index 5906af6a4..b349c43df 100644 --- a/packages/dockview-core/src/dockview/dockviewComponent.ts +++ b/packages/dockview-core/src/dockview/dockviewComponent.ts @@ -351,7 +351,13 @@ export class DockviewComponent minimumInViewportHeight: 100, }); - overlay.setupDrag(group.element, { + const el = group.element.querySelector('void-container'); + + if (!el) { + throw new Error('failed to find drag handle'); + } + + overlay.setupDrag(el, { inDragMode: typeof options?.inDragMode === 'boolean' ? options.inDragMode