Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copy image to clipboard broken #26572

Closed
v411e opened this issue Nov 14, 2023 · 9 comments
Closed

Copy image to clipboard broken #26572

v411e opened this issue Nov 14, 2023 · 9 comments
Labels
T-Defect X-Needs-Info This issue is blocked awaiting information from the reporter Z-Upstream

Comments

@v411e
Copy link

v411e commented Nov 14, 2023

Steps to reproduce

  1. Go to Element Web or Desktop and open a chat with some images
  2. Right click on an image, select "Copy Image"
  3. Open another Program (e.g. MS Word or Thunderbird)
  4. Image can not be pasted
    image

Outcome

What did you expect?

I expected the image to be properly copied and pasted.

What happened instead?

Image can not be pasted.

Operating system

Windows 10

Browser information

Google Chrome and Element Desktop

URL for webapp

No response

Application version

Element 1.11.49

Homeserver

No response

Will you send logs?

No

@v411e v411e added the T-Defect label Nov 14, 2023
@t3chguy
Copy link
Member

t3chguy commented Nov 14, 2023

This is a feature of your browser, not the app. I suggest using something like https://evercoder.github.io/clipboard-inspector/ to see what your browser copied.

@v411e
Copy link
Author

v411e commented Nov 15, 2023

Okay interesting. Looks like it is copied as "Blob URL" and not all other apps support reading that.

<img src="blob:vector://vector/17061205-bc4c-4ae9-baf9-e77c98b54368" alt="image.png">

@t3chguy
Copy link
Member

t3chguy commented Nov 15, 2023

Blob URLs are not accessible to sites other than the one they originated from so this feels like a Chrome issue.

When I copy image from Chrome on macOS in an encrypted room and paste it into the site above I get the actual image/png and not just the blob URL text/html entity

image

The actual image/png is what other sites should be using rather than the text/html - can you confirm if you're seeing both entries in the clipboard @v411e

@t3chguy t3chguy added the X-Needs-Info This issue is blocked awaiting information from the reporter label Nov 15, 2023
@lalitkumawat1m
Copy link

I want to work on this issue please assign it to me

@t3chguy
Copy link
Member

t3chguy commented Nov 16, 2023

@lalitkumawat1m this is an upstream issue, so not an issue with Element Web/Desktop but either with https://github.com/chromium/chromium or MS Word and/or Thunderbird

@v411e
Copy link
Author

v411e commented Nov 17, 2023

Yes, can confirm. This is Copied from Element Desktop and pasted in Chrome

image

@v411e
Copy link
Author

v411e commented Nov 17, 2023

But I just tried it using Element Web in Firefox and it was the exact same problem. So I guess it is not just a Chrome Issue then?

Copied from Element Web in Firefox, pasted in Thunderbird/Microsoft Word:
image

Copied from Element Web in Firefox, pasted in Chrome:
image

@t3chguy
Copy link
Member

t3chguy commented Nov 17, 2023

No, as you have shown that the image/png data is visible there, the problem is with the app pasting using text/html instead of image/png - the former they cannot parse due to blob. There is nothing we can do here, we cannot not use blob URIs due to end-to-end encryption, there's no actual URL which represents the media given its encrypted. It is probably MS Word & Thunderbird trying to be clever around "rich" pasting, but getting it wrong when they can't load the blob.

@t3chguy t3chguy closed this as not planned Won't fix, can't repro, duplicate, stale Nov 17, 2023
@v411e
Copy link
Author

v411e commented Nov 17, 2023

Ah makes sense, thank you for explaining

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-Defect X-Needs-Info This issue is blocked awaiting information from the reporter Z-Upstream
Projects
None yet
Development

No branches or pull requests

3 participants