aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormrmr19932017-04-17 17:33:16 +0100
committermrmr19932017-04-17 17:33:16 +0100
commit42025fd9ceb7042e80b09744fdcdd47d447dec2f (patch)
tree58b033b1cdd73b7b68d5a2480ae58eebc77f06d9
parent1190be3c0182e1a93bb67e695c4238f286910bdc (diff)
downloadvimium-42025fd9ceb7042e80b09744fdcdd47d447dec2f.tar.bz2
Clarify postFindFocus and obviously separate it from the try..catch
-rw-r--r--content_scripts/mode_find.coffee3
1 files changed, 3 insertions, 0 deletions
diff --git a/content_scripts/mode_find.coffee b/content_scripts/mode_find.coffee
index d6835e6b..63825600 100644
--- a/content_scripts/mode_find.coffee
+++ b/content_scripts/mode_find.coffee
@@ -181,6 +181,9 @@ class FindMode extends Mode
try
result = window.find(query, options.caseSensitive, options.backwards, true, false, true, false)
catch # Failed searches throw on Firefox.
+
+ # window.find focuses the |window| that it is called on. This gives us an opportunity to (re-)focus
+ # another element/window, if that isn't the behaviour we want.
options.postFindFocus?.focus()
if options.colorSelection