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.
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.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
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 throughonFiles) and callspreventDefault(), then the event bubbles to the composer'sonDrop(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, cleardroppingand then return ife.isDefaultPrevented(). Add a test; none of the compose tests cover drop.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.