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

Clipboard seems to be nonfunctional in Edge, Vivaldi, and Opera GX Browsers #1316

Closed
nonplayer opened this issue May 23, 2021 · 4 comments · Fixed by #1325
Closed

Clipboard seems to be nonfunctional in Edge, Vivaldi, and Opera GX Browsers #1316

nonplayer opened this issue May 23, 2021 · 4 comments · Fixed by #1325
Labels
Milestone

Comments

@nonplayer
Copy link

I've been trying the 1.14.1 app, first time using DR in a few months away from the table. The clipboard does not seem to function in some of the browsers I've tried. In Firefox it opens a new tab with a full image clip of the map. In Opera, Vivaldi, and Edge (all Chromium-based) it does nothing, opening only a blank page.

I'm running Windows 10 x64 v2004, and the DR instance is 1.14.1 hosted on an Ubuntu 20.04 machine via docker.

@n1ru4l
Copy link
Member

n1ru4l commented May 24, 2021

As mentioned on Discord the main browsers supported are Google Chrome and Safari iOS, thus I will not try to fix this issue as I rather focus on other stuff than browser compatibility. But I will accept pull requests that fix this behaviour across browsers.

@nonplayer
Copy link
Author

This does not work for me in Chrome either. Chrome version 90.0.4430.212 Official Build x86_64, freshly installed with no additional plugins. Clicking Clipboard opens nothing but a blank page.

The only browser where it is working for me happens to be Firefox, which you have marked as unsupported.

@nonplayer
Copy link
Author

nonplayer commented May 24, 2021

Also just tried on Safari 14.0.3 on a Macbook Pro running Catalina 10.15.7. All I get is "about:blank" in a new tab.

To clarify, Firefox still works, and loads the following (truncated) URL:

data:image/png;base64,iVBORw0KGgoAAAANS...

All others are just "about:blank"

edit: the close below was by accident

@nonplayer nonplayer reopened this May 24, 2021
@n1ru4l
Copy link
Member

n1ru4l commented May 26, 2021

For reference from discord

[06:36] n1ru4l: https://developer.mozilla.org/en-US/docs/Web/API/Clipboard#clipboard_availability
Clipboard - Web APIs | MDN
The Clipboard interface implements the Clipboard API, providing—if the user grants permission—both read and write access to the contents of the system clipboard.

[06:37] n1ru4l: According to MDN the Clipboard API is only available on sites served via HTTPS.
[22:20] n1ru4l: Okay I did some more research, Chrome disabled open images as base64 encoded strings, so we will have to change the implementation so that the Copy is only available if the site is hosted via https.
[22:21] n1ru4l:
Remove content-initiated top frame navigations to data URLs
Because of their unfamiliarity to non-technical browser users, we're increasingly seeing the data: scheme being used in spoofing and phishing attacks. To prevent this, we're blocking web pages from loading data: URLs in the top frame. This applies to <a> tags, window.open, window.location and similar mechanisms. The data: scheme will still work for resources loaded below by a page.

This feature will be removed in Chrome 60.
[22:22] n1ru4l: That means that I will change the code so that the Copy button is only visible when using HTTPS and a browser that supports the Async Clipboard API. That might suck, but we cannot guarantee the functionality, so it is rather considered a bug fix by me than a feature removal

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants