From 351489c7c5e093531aa8cd5870a3f78c99fb2923 Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Wed, 21 Dec 2016 16:09:59 +0000 Subject: 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. --- content_scripts/hud.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'content_scripts/hud.coffee') 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() -- cgit v1.2.3