From 7bae1bd5cb131989581eb3940527d29cb8895c90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20Johan=20S=C3=B8rvig?= Date: Wed, 3 Apr 2019 22:59:57 +0200 Subject: wasm: hide canvas text caret Another side effect of setting contenteditable on the canvas. Seen on Firefox. Change-Id: I789ba4d7e6fbbdbf14b66fe1ae57183ec04e04bb Reviewed-by: Lorn Potter --- src/plugins/platforms/wasm/qtloader.js | 1 + src/plugins/platforms/wasm/wasm_shell.html | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'src/plugins') diff --git a/src/plugins/platforms/wasm/qtloader.js b/src/plugins/platforms/wasm/qtloader.js index 3cbb1c8aa8..2db7723ae2 100644 --- a/src/plugins/platforms/wasm/qtloader.js +++ b/src/plugins/platforms/wasm/qtloader.js @@ -164,6 +164,7 @@ function QtLoader(config) // Set contentEditable in order to enable clipboard events; hide the resulting focus frame. canvas.contentEditable = true; canvas.style.outline = "0px solid transparent"; + canvas.style.caretColor = "transparent"; canvas.style.cursor = "default"; return canvas; diff --git a/src/plugins/platforms/wasm/wasm_shell.html b/src/plugins/platforms/wasm/wasm_shell.html index 6ad7886ed4..f7c856d63d 100644 --- a/src/plugins/platforms/wasm/wasm_shell.html +++ b/src/plugins/platforms/wasm/wasm_shell.html @@ -11,7 +11,7 @@ /* The contenteditable property is set to true for the canvas in order to support clipboard events. Hide the resulting focus frame and set the cursor back to the default cursor. */ - canvas { outline: 0px solid transparent; cursor:default } + canvas { outline: 0px solid transparent; caret-color: transparent; cursor:default } -- cgit v1.2.3