From bac0a0b3978d328f0dee700dafa9d49e6b28d8fc Mon Sep 17 00:00:00 2001 From: Vincent de Vreede Date: Fri, 12 Jul 2024 14:25:23 +0200 Subject: [PATCH] Fix: Prevent iframe from capturing mouse events in composed Storybooks --- code/core/src/manager/components/layout/useDragging.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/core/src/manager/components/layout/useDragging.ts b/code/core/src/manager/components/layout/useDragging.ts index 4711354153b3..1c00f516c234 100644 --- a/code/core/src/manager/components/layout/useDragging.ts +++ b/code/core/src/manager/components/layout/useDragging.ts @@ -37,7 +37,7 @@ export function useDragging({ useEffect(() => { const panelResizer = panelResizerRef.current; const sidebarResizer = sidebarResizerRef.current; - const previewIframe = document.querySelector('#storybook-preview-iframe') as HTMLIFrameElement; + const previewIframe = document.querySelector('#storybook-preview-wrapper') as HTMLIFrameElement; let draggedElement: typeof panelResizer | typeof sidebarResizer | null = null; const onDragStart = (e: MouseEvent) => {