aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Blott2015-01-09 22:08:37 +0000
committerStephen Blott2015-01-09 22:12:53 +0000
commit93de6384632e3e682e02be4cb8cea160997de127 (patch)
tree211ac450ccaf6a30b8a8e8be834929858d469822
parent6008bd71fc091918acc73c5b6f2576ad40b7764a (diff)
downloadvimium-93de6384632e3e682e02be4cb8cea160997de127.tar.bz2
Modes; fix focus return value for InsertModeTrigger.
-rw-r--r--content_scripts/mode_insert.coffee9
1 files changed, 5 insertions, 4 deletions
diff --git a/content_scripts/mode_insert.coffee b/content_scripts/mode_insert.coffee
index c0a61d31..b86b853c 100644
--- a/content_scripts/mode_insert.coffee
+++ b/content_scripts/mode_insert.coffee
@@ -51,9 +51,10 @@ class InsertModeTrigger extends Mode
@push
focus: (event) =>
triggerSuppressor.unlessSuppressed =>
- return unless DomUtils.isFocusable event.target
- new InsertMode
- targetElement: event.target
+ @alwaysContinueBubbling =>
+ if DomUtils.isFocusable event.target
+ new InsertMode
+ targetElement: event.target
# We may already have focussed an input, so check.
if document.activeElement and DomUtils.isEditable document.activeElement
@@ -61,7 +62,7 @@ class InsertModeTrigger extends Mode
targetElement: document.activeElement
# Used by InsertModeBlocker to suppress InsertModeTrigger; see below.
-triggerSuppressor = new Utils.Suppressor true
+triggerSuppressor = new Utils.Suppressor true # Note: true == @continueBubbling
# Suppresses InsertModeTrigger. This is used by various modes (usually by inheritance) to prevent
# unintentionally dropping into insert mode on focusable elements.