Commit Graph
5 Commits
Author SHA1 Message Date
Tom Moor 9dc74f4459 fix: Insert files dropped around the document at the nearest editor position (#13575)
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.
2026-08-27 17:11:56 -04:00
Tom MoorandCopilot Autofix powered by AI 7fed1597df 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>
2026-07-25 07:56:23 -04:00
Tom MoorandClaude Fable 5 8be4a0ac34 fix: Crash when dropping outside editor after drag began over it (#13037)
* 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>
2026-07-18 12:39:13 -04:00
Tom Moor 401214112c fix: Image drop into editor (#12691) 2026-06-15 08:06:16 -04:00
Tom Moor 7106263f88 fix: Dragging images in editor (#12647)
* fix: Editor image dragging

* feedback
2026-06-09 22:27:42 -04:00