summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorten Johan Sørvig <morten.sorvig@qt.io>2019-04-03 22:59:57 +0200
committerMorten Johan Sørvig <morten.sorvig@qt.io>2019-04-04 09:29:50 +0000
commit7bae1bd5cb131989581eb3940527d29cb8895c90 (patch)
treea4350616c8e40f0d712fe5b92ea077628d28e3c8
parentf80b7995f3e5bc289f3255dfe914e1acde328af2 (diff)
wasm: hide canvas text caret
Another side effect of setting contenteditable on the canvas. Seen on Firefox. Change-Id: I789ba4d7e6fbbdbf14b66fe1ae57183ec04e04bb Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
-rw-r--r--src/plugins/platforms/wasm/qtloader.js1
-rw-r--r--src/plugins/platforms/wasm/wasm_shell.html2
2 files changed, 2 insertions, 1 deletions
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 }
</style>
</head>
<body onload="init()">