bbennett-ks opened a new pull request, #1169:
URL: https://github.com/apache/guacamole-client/pull/1169

   On a Mac browser (Chrome or FireFox), using and Guacamole RDP session to 
connect to a Rocky 9 VM. When the browser loses (blur) focus and regains focus, 
mouse events are not processed.
   
   **clipboardService.resyncClipboard()** sets `clipboardSyncInProgress=true` 
and calls `getLocalClipboard()`. If getLocalClipboard() fails, 
guacClient.handleMouseEvent() stays blocked in waitForClipboardSync() because 
the flag was not cleared, so mouse events are not processed.
   
   **getLocalClipboard()** returns a promise that rejects when clipboard read 
fails: either navigator.clipboard.readText() rejects, or fallback 
document.execCommand('paste') returns false.
   
   **resyncClipboard()** sets clipboardSyncInProgress=true before that promise, 
and handleMouseEvent() waits on waitForClipboardSync()’s promise. If the 
rejection path doesn’t clear the flag, that wait promise never resolves, so 
client.sendMouseState(...) is never called.
   
   The fix is to set **clipboardSyncInProgress=false** in the 
getLocalClipboard() failure path.
   
   Further investigation is needed to determine exactly why 
navigator.clipboard.readText() and document.execCommand('paste') fail in this 
environment.
   
   The latter issue is likely due to browser security policy around clipboard 
access on non-secure origins, and probably won't fail over HTTPS. Testing using 
Chrome launched with 
--unsafely-treat-insecure-origin-as-secure=http://192.168.238.132:8080/guacamole/,
 the issue was not reproduced.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to