From fd6693ee17c06d4f1807360711f9e024da269f3e Mon Sep 17 00:00:00 2001 From: Zac Gaetano Date: Tue, 19 May 2026 13:00:09 -0400 Subject: [PATCH] fix: remove ContextMenuTrigger asChild from draggable elements to fix drag initiation With asChild, Radix merges its pointer event handlers directly onto the draggable div. This interferes with browser drag gesture initiation, resulting in no ghost image and no drag events firing. Fix: remove asChild so ContextMenuTrigger renders its own span (with display:contents to preserve layout). Radix handlers now live on the ancestor span, not the draggable div. Right-click still bubbles up to trigger the context menu correctly. Also add draggable={false} to elements inside draggable divs to prevent browser native image drag from competing with the parent. --- .../editor/apps/web/src/components/editor/AssetsPanel.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/services/editor/apps/web/src/components/editor/AssetsPanel.tsx b/services/editor/apps/web/src/components/editor/AssetsPanel.tsx index f532b03..0117c05 100644 --- a/services/editor/apps/web/src/components/editor/AssetsPanel.tsx +++ b/services/editor/apps/web/src/components/editor/AssetsPanel.tsx @@ -240,7 +240,7 @@ const MediaThumbnail: React.FC<{ if (viewMode === "list") { return ( - +
{item.thumbnailUrl ? ( - {item.name} + {item.name} ) : (
@@ -386,7 +386,7 @@ const MediaThumbnail: React.FC<{ return ( - +
{/* Thumbnail container */}
) : (