summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFredrik Kortetjärvi <freko@cendio.se>2022-12-14 11:27:12 +0100
committerPierre Ossman <ossman@cendio.se>2022-12-14 13:47:01 +0100
commit90f120c1394c9f10fa34c78b08bade4c431aedf7 (patch)
treed4fa7d67f9e5424fec9c137d17b10a0580020a5e
parent156b9a99e27f47a2818cc9fb10e1b12c763b8e32 (diff)
downloadnovnc-90f120c1394c9f10fa34c78b08bade4c431aedf7.tar.gz
Added none user select on the cursor
This is because, when double-clicking with the trackpad, it will not highlight the mouse. And this only happened on the iOS but the decision on adding it a normal user select comes from the other commits that it looks like it elsewhere.
-rw-r--r--core/util/cursor.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/util/cursor.js b/core/util/cursor.js
index 12bcced..3000cf0 100644
--- a/core/util/cursor.js
+++ b/core/util/cursor.js
@@ -18,6 +18,10 @@ export default class Cursor {
this._canvas.style.position = 'fixed';
this._canvas.style.zIndex = '65535';
this._canvas.style.pointerEvents = 'none';
+ // Safari on iOS can select the cursor image
+ // https://bugs.webkit.org/show_bug.cgi?id=249223
+ this._canvas.style.userSelect = 'none';
+ this._canvas.style.WebkitUserSelect = 'none';
// Can't use "display" because of Firefox bug #1445997
this._canvas.style.visibility = 'hidden';
}