aboutsummaryrefslogtreecommitdiffstats
path: root/pages
diff options
context:
space:
mode:
authorStephen Blott2016-04-11 06:38:15 +0100
committerStephen Blott2016-04-11 06:38:28 +0100
commitad2ed18dff81297f43ea89331ba227c26aed654a (patch)
treeb56831d2643f66fb289cdcc2cff6c8627469eab0 /pages
parent931e1b73a518b8c40671ec90331403aaae5e5b46 (diff)
downloadvimium-ad2ed18dff81297f43ea89331ba227c26aed654a.tar.bz2
Only add find-mode HUD text if there is any.
This applies to when find mode is launched. When the text was empty (which is always), we were triggering a console error message (selection range isn't in document). However, when the text is empty, we don't actually need to add it to the input. So, here we don't.
Diffstat (limited to 'pages')
-rw-r--r--pages/hud.coffee2
1 files changed, 1 insertions, 1 deletions
diff --git a/pages/hud.coffee b/pages/hud.coffee
index 33700122..17ac52be 100644
--- a/pages/hud.coffee
+++ b/pages/hud.coffee
@@ -63,7 +63,7 @@ handlers =
inputElement = document.createElement "span"
inputElement.contentEditable = "plaintext-only"
- setTextInInputElement inputElement, data.text ? ""
+ setTextInInputElement inputElement, data.text if data.text
inputElement.id = "hud-find-input"
hud.appendChild inputElement