aboutsummaryrefslogtreecommitdiffstats
path: root/content_scripts
diff options
context:
space:
mode:
Diffstat (limited to 'content_scripts')
-rw-r--r--content_scripts/vimium_frontend.coffee14
1 files changed, 7 insertions, 7 deletions
diff --git a/content_scripts/vimium_frontend.coffee b/content_scripts/vimium_frontend.coffee
index 8f4c7e82..7b404931 100644
--- a/content_scripts/vimium_frontend.coffee
+++ b/content_scripts/vimium_frontend.coffee
@@ -463,13 +463,7 @@ extend window,
KeydownEvents =
handledEvents: {}
- stringify: (event) ->
- JSON.stringify
- metaKey: event.metaKey
- altKey: event.altKey
- ctrlKey: event.ctrlKey
- keyIdentifier: event.keyIdentifier
- keyCode: event.keyCode
+ stringify: (event) -> event.keyCode
push: (event) ->
@handledEvents[@stringify event] = true
@@ -482,6 +476,12 @@ KeydownEvents =
delete @handledEvents[detailString]
value
+ clear: -> @handledEvents = {}
+
+handlerStack.push
+ _name: "KeydownEvents-cleanup"
+ blur: (event) -> KeydownEvents.clear() if event.target == window; true
+
#
# Sends everything except i & ESC to the handler in background_page. i & ESC are special because they control
# insert mode which is local state to the page. The key will be are either a single ascii letter or a