From 4dd16ad9d88b91c8670dc8d7018c5858a651e20b Mon Sep 17 00:00:00 2001 From: Daniel Hammerschmidt Date: Wed, 17 Sep 2025 03:52:37 +0200 Subject: [PATCH] Always initalize canvas.style in case of showing local cursors --- core/util/cursor.js | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/core/util/cursor.js b/core/util/cursor.js index 3f14b95c..03dbe1f1 100644 --- a/core/util/cursor.js +++ b/core/util/cursor.js @@ -19,17 +19,16 @@ export default class Cursor { this._canvas = document.createElement('canvas'); - if (useFallback) { - 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'; - } + // always initalize canvas.style in case of showing local cursors + 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'; this._position = { x: 0, y: 0 }; this._hotSpot = { x: 0, y: 0 };