Compose: attach a file dropped on the editor once #97

Merged
jcoffey-dev merged 1 commits from fix/95-double-drop into main 2026-11-16 15:55:50 +00:00
Owner

Dropping a file on the message body attached it twice: the editor handles the drop (images inline, other files through onFiles) and prevents the default, then the same event bubbles to the composer, which added every file again. Reported on the forum (t/232).

The composer now skips drops the editor already handled (droppedAttachments). Drops on the header, recipients or attachment strip still attach as before. New test in compose/__tests__/drop-attach.test.tsx.

Fixes #95

Dropping a file on the message body attached it twice: the editor handles the drop (images inline, other files through `onFiles`) and prevents the default, then the same event bubbles to the composer, which added every file again. Reported on the forum (t/232). The composer now skips drops the editor already handled (`droppedAttachments`). Drops on the header, recipients or attachment strip still attach as before. New test in `compose/__tests__/drop-attach.test.tsx`. Fixes #95
jcoffey-dev added 1 commit 2026-11-16 15:35:30 +00:00
Compose: attach a file dropped on the editor once
ci / node (pull_request) Skipped
ci / version (pull_request) Skipped
ci / docker-build (pull_request) Skipped
ci / publish (pull_request) Skipped
github/ci (branch) GitHub Actions
ci / github (pull_request) Successful in 2m24s
ci / announce (pull_request) Skipped
5546d6d0b6
The editor handles a file drop itself (images inline, anything else as
an attachment) and prevents the default, but the event still bubbled
to the composer, which attached every dropped file again. The composer
now leaves a drop the editor has already handled alone.

Fixes #95
jcoffey-dev merged commit 19558504db into main 2026-11-16 15:55:50 +00:00
jcoffey-dev deleted branch fix/95-double-drop 2026-11-16 15:55:50 +00:00
Sign in to join this conversation.