aboutsummaryrefslogtreecommitdiffstats
path: root/content_scripts/hud.coffee
diff options
context:
space:
mode:
authorStephen Blott2016-12-21 16:09:59 +0000
committerStephen Blott2016-12-21 16:09:59 +0000
commit351489c7c5e093531aa8cd5870a3f78c99fb2923 (patch)
tree1db2fdd30aeb5fa729750ec41997549064accc6f /content_scripts/hud.coffee
parente89a831ecbcc39ccce6b33e6ee65b29611e03418 (diff)
downloadvimium-351489c7c5e093531aa8cd5870a3f78c99fb2923.tar.bz2
Don't focus non-focusable node.
Try the following.... - load page - `/` - type some junk which matches nothing - `Escape` We expect to leave find mode. Instead, we have to hit escape again to get out of find mode. Here, `focusNode.focus()` is not a function.
Diffstat (limited to 'content_scripts/hud.coffee')
-rw-r--r--content_scripts/hud.coffee2
1 files changed, 1 insertions, 1 deletions
diff --git a/content_scripts/hud.coffee b/content_scripts/hud.coffee
index b2780491..407b90e1 100644
--- a/content_scripts/hud.coffee
+++ b/content_scripts/hud.coffee
@@ -66,7 +66,7 @@ HUD =
focusNode = DomUtils.getSelectionFocusElement()
document.activeElement?.blur()
- focusNode?.focus()
+ focusNode?.focus?()
if exitEventIsEnter
handleEnterForFindMode()