Dropping a file in the margins around a document previously did nothing.
react-dnd's window level dragover handler forced dropEffect to "none" for
any target outside of .ProseMirror, so the browser never dispatched a drop
event there.
* fix: Crash when dropping outside editor after drag began over it
The EditorAwareHTML5Backend suppresses react-dnd's top-level handlers for
events within the ProseMirror editor, so a drag that begins or enters the
page over the editor is never registered with react-dnd. When such a drag
was then dropped outside the editor, the backend's unguarded drop handler
called actions.hover and threw "Invariant Violation: Cannot call hover
while not dragging". Skip the drop handler when no drag is registered,
mirroring the isDragging guard react-dnd already applies to dragover.
Fixes OUTLINE-CLOUD-CPR
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B37TdpqjKYnLAARomVBjUc
* Remove EditorAwareHTML5Backend tests
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B37TdpqjKYnLAARomVBjUc
---------
Co-authored-by: Claude <noreply@anthropic.com>