From 7fed1597df76fbeaa3bf2461ea7390615be674b3 Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Sat, 25 Jul 2026 07:56:23 -0400 Subject: [PATCH] Apply suggested fix to app/components/EditorAwareHTML5Backend.ts from Copilot Autofix (#13126) Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> --- app/components/EditorAwareHTML5Backend.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/components/EditorAwareHTML5Backend.ts b/app/components/EditorAwareHTML5Backend.ts index 6dccf03368..3322d22a19 100644 --- a/app/components/EditorAwareHTML5Backend.ts +++ b/app/components/EditorAwareHTML5Backend.ts @@ -62,11 +62,14 @@ export const EditorAwareHTML5Backend: BackendFactory = ( } // A drag that began or entered the page over the editor is never // registered with react-dnd because those events are skipped above. - // The backend's drop handler assumes a registered drag and calls + // The backend's drop handlers assume a registered drag and may call // `actions.hover` unconditionally, which throws "Cannot call hover // while not dragging" – so drops without a tracked drag must be // ignored here. - if (name === "handleTopDrop" && !monitor.isDragging()) { + if ( + (name === "handleTopDrop" || name === "handleTopDropCapture") && + !monitor.isDragging() + ) { return; } original.call(backend, event);