aboutsummaryrefslogtreecommitdiffstats
path: root/pages
diff options
context:
space:
mode:
authormrmr19932017-02-28 19:54:40 +0000
committermrmr19932017-04-16 15:57:46 +0100
commit0ba625a210f707a66c7f87d350948ab61716409a (patch)
tree82289ce561829606c40b4caafdf0881f37178bb1 /pages
parent73bb694fb26c8a990ea624e9e35cb878ddc96afa (diff)
downloadvimium-0ba625a210f707a66c7f87d350948ab61716409a.tar.bz2
Guard against unsupported non-standard contentEditable=plaintext-only
Diffstat (limited to 'pages')
-rw-r--r--pages/hud.coffee5
1 files changed, 4 insertions, 1 deletions
diff --git a/pages/hud.coffee b/pages/hud.coffee
index 36e4cbd2..af528203 100644
--- a/pages/hud.coffee
+++ b/pages/hud.coffee
@@ -58,7 +58,10 @@ handlers =
hud.innerText = "/\u200A" # \u200A is a "hair space", to leave enough space before the caret/first char.
inputElement = document.createElement "span"
- inputElement.contentEditable = "plaintext-only"
+ try # NOTE(mrmr1993): Chrome supports non-standard "plaintext-only", which is what we *really* want.
+ inputElement.contentEditable = "plaintext-only"
+ catch # Fallback to standard-compliant version.
+ inputElement.contentEditable = "true"
inputElement.id = "hud-find-input"
hud.appendChild inputElement