From b594caa3eb792dfeb9d423c81a5136102a013b0a Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Wed, 14 Jan 2015 15:15:40 +0000 Subject: Modes; more reworking. --- content_scripts/mode.coffee | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'content_scripts/mode.coffee') diff --git a/content_scripts/mode.coffee b/content_scripts/mode.coffee index ab482e8f..79559e35 100644 --- a/content_scripts/mode.coffee +++ b/content_scripts/mode.coffee @@ -44,7 +44,7 @@ count = 0 class Mode # If Mode.debug is true, then we generate a trace of modes being activated and deactivated on the console, along # with a list of the currently active modes. - debug: false + debug: true @modes: [] # Constants; short, readable names for handlerStack event-handler return values. @@ -86,7 +86,7 @@ class Mode _name: "mode-#{@id}/exitOnEscape" "keydown": (event) => return @continueBubbling unless KeyboardUtils.isEscape event - @exit event + @exit event, event.srcElement DomUtils.suppressKeyupAfterEscape handlerStack @suppressEvent @@ -117,8 +117,8 @@ class Mode @passKeys = passKeys @registerStateChange?() - Mode.updateBadge() if @badge Mode.modes.push @ + Mode.updateBadge() @logStack() if @debug # End of Mode constructor. -- cgit v1.2.3