diff options
| author | Stephen Blott | 2015-01-09 16:53:35 +0000 |
|---|---|---|
| committer | Stephen Blott | 2015-01-09 16:53:35 +0000 |
| commit | dc423eff18b2b2654c175633cd11e28ea9279fd7 (patch) | |
| tree | bff94832816cce99591437abeb37a8ed885aa701 | |
| parent | 6008bd71fc091918acc73c5b6f2576ad40b7764a (diff) | |
| download | vimium-dc423eff18b2b2654c175633cd11e28ea9279fd7.tar.bz2 | |
Modes; rework blocker for contentEditable.
| -rw-r--r-- | content_scripts/mode.coffee | 4 | ||||
| -rw-r--r-- | content_scripts/mode_insert.coffee | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/content_scripts/mode.coffee b/content_scripts/mode.coffee index 8e37ee36..b6cb5fae 100644 --- a/content_scripts/mode.coffee +++ b/content_scripts/mode.coffee @@ -175,7 +175,9 @@ class Mode # suppress badge updates while exiting any existing active singleton. This prevents the badge from # flickering in some cases. Mode.badgeSuppressor.runSuppresed => - singletons[key].exit() if singletons[key] + if singletons[key] + console.log singletons[key].count, "singleton:", @name, "(deactivating)" + singletons[key].exit() singletons[key] = @ @onExit => delete singletons[key] if singletons[key] == @ diff --git a/content_scripts/mode_insert.coffee b/content_scripts/mode_insert.coffee index c0a61d31..5375bcdc 100644 --- a/content_scripts/mode_insert.coffee +++ b/content_scripts/mode_insert.coffee @@ -44,6 +44,7 @@ class InsertModeTrigger extends Mode # and unfortunately, the focus event happens *before* the change is made. Therefore, we need to # check again whether the active element is contentEditable. return @continueBubbling unless document.activeElement?.isContentEditable + console.log @count, @name, "fired (by keydown)" new InsertMode targetElement: document.activeElement @stopBubblingAndTrue @@ -52,6 +53,7 @@ class InsertModeTrigger extends Mode focus: (event) => triggerSuppressor.unlessSuppressed => return unless DomUtils.isFocusable event.target + console.log @count, @name, "fired (by focus)" new InsertMode targetElement: event.target |
