aboutsummaryrefslogtreecommitdiffstats
path: root/content_scripts/mode.coffee
diff options
context:
space:
mode:
authorStephen Blott2015-01-06 09:42:28 +0000
committerStephen Blott2015-01-06 09:42:28 +0000
commit3594bad00aec580bc837e2b2cc6d4051da149da0 (patch)
treec97730fa6407203b0f7d62489374277ffa985e30 /content_scripts/mode.coffee
parentb1d14573539ea6006fa8506ff44d2a58f5ac1211 (diff)
downloadvimium-3594bad00aec580bc837e2b2cc6d4051da149da0.tar.bz2
Modes; rework insert blocker.
Fix bug whereby clicking on the focused element does not activate insert mode. This bug is also present (though harder to fix) in master.
Diffstat (limited to 'content_scripts/mode.coffee')
-rw-r--r--content_scripts/mode.coffee4
1 files changed, 4 insertions, 0 deletions
diff --git a/content_scripts/mode.coffee b/content_scripts/mode.coffee
index adc5439d..b3cca56c 100644
--- a/content_scripts/mode.coffee
+++ b/content_scripts/mode.coffee
@@ -125,6 +125,10 @@ class SingletonMode extends Mode
SingletonMode.instances[@singleton] = @
super options
+ # Static method. Return whether the indicated mode (singleton) is currently active or not.
+ @isActive: (singleton) ->
+ @instances[singleton]?
+
# Static method. If there's a singleton instance active, then kill it.
@kill: (singleton) ->
SingletonMode.instances[singleton].exit() if SingletonMode.instances[singleton]