From 4f0fd25bcc5fb3dbb85779785cea8ef864d9078b Mon Sep 17 00:00:00 2001 From: Jan Van Bruggen Date: Mon, 27 Dec 2021 13:12:16 -0700 Subject: [PATCH] Prevent using the clipboard when it's disabled --- html5/index.html | 2 ++ html5/js/Client.js | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/html5/index.html b/html5/index.html index 8d91386e..8fc4f1f8 100644 --- a/html5/index.html +++ b/html5/index.html @@ -1366,6 +1366,8 @@

Xpra Bug Report

// disable right click menu: window.oncontextmenu = function(e) { client._poll_clipboard(e); + e.preventDefault(); + e.stopPropagation(); return false; } } diff --git a/html5/js/Client.js b/html5/js/Client.js index ae858dc6..6f2a67a9 100644 --- a/html5/js/Client.js +++ b/html5/js/Client.js @@ -1578,6 +1578,9 @@ XpraClient.prototype.do_window_mouse_scroll = function(e, window) { XpraClient.prototype._poll_clipboard = function(e) { + if (this.clipboard_enabled === false) { + return; + } //see if the clipboard contents have changed: if (this.clipboard_pending) { //we're still waiting to set the clipboard.. @@ -1619,6 +1622,9 @@ XpraClient.prototype._poll_clipboard = function(e) { }; XpraClient.prototype.read_clipboard_text = function() { + if (this.clipboard_enabled === false) { + return; + } const client = this; client.debug("clipboard", "read_clipboard()"); //warning: this can take a while,