[ https://issues.apache.org/jira/browse/GUACAMOLE-1857?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17770546#comment-17770546 ]
Mike Jumper commented on GUACAMOLE-1857: ---------------------------------------- Could be worth attempting a clipboard resync every time there is local interaction with the keyboard, touch, or mouse ... but even if WebKit allows that, it would still only work if the remote interaction attempting to copy/paste is lengthy enough and involves enough gestures that we have time to read the local clipboard _and_ send it to the remote side before the user completes their attempt, and there will be cases where that can't happen and clipboard usage would mysteriously use stale data (middle-clicking to immediately paste into a terminal emulator, for example). Maybe we could: # Track whether the clipboard access has definitively succeeded or failed upon switching back to the tab with Guacamole running. # If clipboard access failed, withhold sending user interactions, instead: ## Queue user interactions for future sending. ## Use the first user gesture to attempt to read the clipboard again. ## Dispatch queued interactions once that attempt has definitively succeeded or failed. ## Cease queuing and resume sending interactions immediately. In the past, reading from the clipboard within browsers that required user gestures was impossible as the clipboard read would only be permitted if {{preventDefault()}} was not invoked for that gesture. If that is still the case for WebKit, then this will be impossible, as {{preventDefault()}} is necessary to ensure user gestures affect only the remote desktop and not the local system. > Add Safari/Webkit support for clipboard (aync api) > -------------------------------------------------- > > Key: GUACAMOLE-1857 > URL: https://issues.apache.org/jira/browse/GUACAMOLE-1857 > Project: Guacamole > Issue Type: Improvement > Components: guacamole-client > Affects Versions: 1.5.3 > Reporter: sbcbus > Priority: Trivial > > The [current FAQ > |https://guacamole.apache.org/faq/#keyboard-shortcuts]mentions mostly Chrome > for supporting writing/reading from the clipboard via the newer async > clipboard API, which doesn't require bringing up the Guacamole menu. Webkit > has seemingly adopted this API as of [June > 2020|[https://webkit.org/blog/10855/async-clipboard-api/].] > > The FAQ also mentions some browsers implement restrictions, and there is a > section in the webkit announcement about clicks required, etc. It would be > nice to see if this could be revisited and see the behavior in Chrome today > can be matched. -- This message was sent by Atlassian Jira (v8.20.10#820010)