aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarl Helmertz2012-08-26 12:35:38 +0200
committerCarl Helmertz2012-08-26 12:56:33 +0200
commitb7d20cad6e854d03b1f10a6eb7c4e44cbb2437c3 (patch)
treeec6f24d4c2b907c1482777a1398b9f0cd599f21f
parent2ddbd58971bb07cc6cbde48e075b0f7aa10dcb03 (diff)
downloadvimium-b7d20cad6e854d03b1f10a6eb7c4e44cbb2437c3.tar.bz2
frontend: performFind was not focusing the next a-element
To reproduce, pre-this-patch: 1 Enter find mode ('/') 2 Search for something that matches multiple a-hrefs on the page 3 'Enter' to indicate that you've found your search term 4 findNext ('n') 4a Now, the next element get's a highlight but is not focused 5 activate/goto ('enter') 5a The first found match (3) is triggered An easy way to reproduce: go to a gitweb page, search for "summary", try to go to any but the first link's href. Signed-off-by: Carl Helmertz <helmertz@gmail.com>
-rw-r--r--content_scripts/vimium_frontend.coffee3
1 files changed, 2 insertions, 1 deletions
diff --git a/content_scripts/vimium_frontend.coffee b/content_scripts/vimium_frontend.coffee
index 5b7a7402..4e804d82 100644
--- a/content_scripts/vimium_frontend.coffee
+++ b/content_scripts/vimium_frontend.coffee
@@ -698,7 +698,8 @@ findAndFocus = (backwards) ->
# if we have found an input element via 'n', pressing <esc> immediately afterwards sends us into insert
# mode
- elementCanTakeInput = DomUtils.isSelectable(document.activeElement) &&
+ elementCanTakeInput = document.activeElement &&
+ DomUtils.isSelectable(document.activeElement) &&
isDOMDescendant(findModeAnchorNode, document.activeElement)
if (elementCanTakeInput)
handlerStack.push({