-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Add clipboard support, continued #1562
Conversation
After the merge conflict was resolved + added an all
|
@samhed / @CendioOssman : anything else that should be on the current task list for moving this toward mergeable? |
Clipboard needs to be supported on all target browsers.
Chrome: all tests pass Firefox: all tests pass (!) Safari 14.0.3 (=old version, will retest on current Safari later): automatic clipboard tests fail with exceptions on: The offending line appears to be the
If this works on the current version we should be fine, because this needs-current-safari feature is only required to run the
|
Bingo, even the test code now passes on current version of Safari (14.1.1):
So in conclusion, I believe the auto-clipboard /does/ work on even old or current versions of Safari (by testing), but the auto sync clipboard tests fail unless you use a recent Safari version, which seems like no big deal to me? Safari: tests pass Next I'll try interactive usage to validate the feature, we'll see if Firefox actually now magically works or if the tests need updating to properly break!!! |
I'd be happy to fix the conflicts and complete any needed work on my original PR as long as the maintainers are willing to merge it. A big portion of my efforts to improve noVNC have been either rejected or introduced by the maintainers bypassing my PRs. So I am not confortable putting more effort here unless it's clear that the maintainers are willing to merge the PR. |
@juanjoDiaz that would be amazing! I totally understand the feeling, I've been on both sides of this fence before..... please let me know if there's anything I can do to help out, sometimes a small tag team at the end can help, if only because it helps maintainers like @samhed know that somebody else has validated a PR (e.g. cross-platform) if they don't have the time/energy/other to check it themselves |
@juanjoDiaz @snickell that is really nice work thanks! hope this PR would be merged soon |
Thanks for moving this forward @snickell, I'm back from my vacation now. Since you're on top of this at the moment, let's continue here in this PR. Have you had a chance to look at Firefox? @juanjoDiaz I believe we have given proper attribution when commiting your changes in the past. |
Am I missing something here? I merged these changes into 1.2 and while copying out to the clipboard works, pasting something copied from outside the browser pastes what was originally copied from the session, not what was copied outside the browser. |
You still around @snickell? |
It turns out tightvnc doesn't support copy from virtual session into system clipboard. I'm looking at replacing it. |
Any update on this? Also does this issue looks similar? fcwu/docker-ubuntu-vnc-desktop#272 |
my way to add paste latin clipboard text to TTY (or graphical field) by pressing ctrl-v or shift-Ins |
This did not quite work for me when I applied it locally. Even when I fixed it to actually dispatch the handleCopy/handlePaste. Here is the logic I would suggest following:
window.addEventListener('focus', () => {
navigator.clipboard.readText().then(text => this.clipboardPasteFrom(text));
});
document.addEventListener('copy', () => {
navigator.clipboard.writeText(document.getElementById('noVNC_clipboard_text').value);
}); That's pretty much it. It also requires to not Would you be interested in getting a patch with those changes? |
|
It just gets confusing to have multiple PR's open on the same topic, #1347 has slightly more recent activity, closing this one. To confirm — we are still interested in merging this type of feature. The problem with this pull request is that we haven't had any activity from the author since July 2021. |
This PR is a continuation of @juanjoDiaz 's hard work here: #1347
At the moment, its identical to #1347 , but with the merge conflict relative to
noVNC:master
resolved. I'll continue to push to this PR as required to resolve issues and get this ready for @samhed 's approval.Please close this PR if its not helpful, but I don't think the other PR can be continued without @juanjoDiaz being involved, so it seemed like a new PR was necessary to fix #1511
@juanjoDiaz explained it better than I can:
I'll try to keep a task list updated here for known remaining tasks:
npm test
passes on Chromenpm test
passes on Safarinpm test passes on Firefox