You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR novnc/noVNC#1301 works in Chrome but not Firefox. We did some extra work to make copy and paste work in Firefox in the shell app, and I think we can do the same here.
The idea would be to add this optional fix, and then give the user the option to include or exclude this hack when launching the noVNC client.
If we applied this, it would be interesting to see its benefits and limitations. We could provide this or something similar to a modified novnc.html and provide users with the option of which viewer they want to load (the one with the hack, the one without).
If the code as is works we should reach out to the author asking for a license (maybe make a gist with the MIT license, for example).
The text was updated successfully, but these errors were encountered:
ericfranz
changed the title
Dashboard: Experiment with copy/paste hack in NoVNC
Dashboard: Add optional hack to enable with copy/paste in NoVNC
Dec 5, 2019
Adding support to Firefox will not work at this time. Using the legacy document.execCommand('copy') approach will not work because you get an error:
document.execCommand(‘cut’/‘copy’) was denied because it was not called from inside a short running user-generated event handler
This is because unlike the shell app, in NoVNC the user is interacting with the canvas, and it is a message receive event that triggers the copy to clipboard event. Since this stack is not recognized as user generated (since the stack doesn't include a user click event, for example), copy will not work without substantial work.
As for utilizing the new Async ClipboardAPI, Firefox does not yet support the 'clipboard-read' and 'clipboard-write' permissions of the Permissions API.
This PR novnc/noVNC#1301 works in Chrome but not Firefox. We did some extra work to make copy and paste work in Firefox in the shell app, and I think we can do the same here.
The idea would be to add this optional fix, and then give the user the option to include or exclude this hack when launching the noVNC client.
Original issue description:
The text was updated successfully, but these errors were encountered: