Signal-Desktop icon indicating copy to clipboard operation
Signal-Desktop copied to clipboard

Drag and dropping images from other applications does not work

Open jwiesler opened this issue 4 years ago • 6 comments

  • [x] I have searched open and closed issues for duplicates

Bug Description

Drag and drop of images from other applications (firefox and chrome, possibly more, didn't test) that are not represented as a file does not work. Right click copy and then pasting the image works. Dragging the image to the desktop and then dragging the file to Signal works.

Steps to Reproduce

  1. Drag an image from e.g. firefox
  2. Move it to Signal
  3. See the drop icon and text
  4. Release the mouse

Actual Result: Nothing happens.

Expected Result: Image gets added to the attachments.

Platform Info

Signal Version: v5.16.0

Operating System: Windows 10 Version 1909

jwiesler avatar Sep 09 '21 14:09 jwiesler

Sorry about this. Could you try recently released v5.17.0 to see if it fixes the issue for you?

indutny-signal avatar Sep 09 '21 18:09 indutny-signal

Yes, still the case. This problem exists since about half a year if I remember correctly, I just didn't get to filing an issue.

jwiesler avatar Sep 10 '21 14:09 jwiesler

Two things here.

Drag and drop of images from other applications (firefox and chrome, possibly more, didn't test) that are not represented as a file does not work.

Doesn't appear that this behavior is implemented in Signal Desktop at the moment, so it's expected it wouldn't work, and this is more of a feature request than a bug. Dragging and dropping from a browser like that only provides Signal Desktop with the URL of the image, not the image itself, so it would be more involved to have it work the way you're expecting here.

See the drop icon and text

This appears to be a bug in Chromium/Electron. Take this page for example. In Firefox and Safari the drop icon only shows up when hovered over the drop zone, in Chrome the drop icon is always present, even though it has no effect when dropped elsewhere on the page.

So if that bug in Chromium is fixed, it would be more clear in Signal Desktop when drops are actually allowed. Right now the drop icon will appear everywhere in the app.

dsanders11 avatar Oct 05 '21 17:10 dsanders11

This appears to be a bug in Chromium/Electron.

Ok that makes sense.

About the rest: I've tested it locally and on Windows Firefox does create a tmp file and this file is provided in the drop event received. All that needs to change to support those files is to convert this check to a does-not-contain check (it does contain "Files", but not at the first position). event.dataTransfer.files contains the file path like a normal file drop event does.

I did change the lines and tested it, it works for Windows and Firefox, Chrome does not provide this data like you said and would need more work. Nevertheless, I hope you can at least change this line to support Firefox :)

jwiesler avatar Oct 27 '21 16:10 jwiesler

Not sure if this is related or not, but I tried dragging from Dolphin which is KDE:Plasma's file manager and it doesn't work. You need to explicitly click the paper clip icon to attach files.

Goddard avatar May 30 '24 21:05 Goddard

Not sure if this is related or not, but I tried dragging from Dolphin which is KDE:Plasma's file manager and it doesn't work. You need to explicitly click the paper clip icon to attach files.

Similarly, under GNOME 46.2, dragging and dropping from Nautilus (the GNOME file manager) works sometimes. I can drop the file two or three times typically (but has been as many as five or six times) before Signal attaches it to the message. I have tried typing the message first, and also tried on an empty message, it doesn't seem to change things.

Signal v7.12.0

carneeki avatar Jun 19 '24 02:06 carneeki