Dropping a file on the compose window attaches it twice #95

Closed
opened 2026-11-16 15:16:08 +00:00 by jcoffey-dev · 1 comment
Owner

Reported on the forum (https://community.coffeylabs.org/t/232, post 29).

The editor's onDrop (web/src/views/compose/RichEditor.tsx:198) handles the drop (images inline, other files through onFiles) and calls preventDefault(), then the event bubbles to the composer's onDrop (web/src/views/compose/Composer.tsx:186), which adds every dropped file again. A non-image file gets two attachment chips; an image is inserted inline and attached too. Dropping on the header or in plain-text mode attaches once.

Fix: in the composer's onDrop, clear dropping and then return if e.isDefaultPrevented(). Add a test; none of the compose tests cover drop.

Reported on the forum (https://community.coffeylabs.org/t/232, post 29). The editor's `onDrop` (`web/src/views/compose/RichEditor.tsx:198`) handles the drop (images inline, other files through `onFiles`) and calls `preventDefault()`, then the event bubbles to the composer's `onDrop` (`web/src/views/compose/Composer.tsx:186`), which adds every dropped file again. A non-image file gets two attachment chips; an image is inserted inline and attached too. Dropping on the header or in plain-text mode attaches once. Fix: in the composer's `onDrop`, clear `dropping` and then return if `e.isDefaultPrevented()`. Add a test; none of the compose tests cover drop.
jcoffey-dev added the
priority
p2
bug
labels 2026-11-16 15:16:08 +00:00
jcoffey-dev self-assigned this 2026-11-16 15:16:08 +00:00
jcoffey-dev added this to the 27.1 milestone 2026-11-16 15:23:15 +00:00
Author
Owner

Fixed in #97. A drop on the editor is no longer added again by the compose window. Thanks to khashmeshab (https://community.coffeylabs.org/t/232). In the next webmail RC.

Fixed in #97. A drop on the editor is no longer added again by the compose window. Thanks to khashmeshab (https://community.coffeylabs.org/t/232). In the next webmail RC.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: inbuxa/inbuxa-webmail#95