From 3594bad00aec580bc837e2b2cc6d4051da149da0 Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Tue, 6 Jan 2015 09:42:28 +0000 Subject: 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. --- content_scripts/mode.coffee | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'content_scripts/mode.coffee') 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] -- cgit v1.2.3