diff options
| author | gdh1995 | 2015-07-29 00:18:23 +0800 |
|---|---|---|
| committer | gdh1995 | 2015-07-29 00:18:23 +0800 |
| commit | 3a64a851201a78db2c30b47fca266c81bdb860d4 (patch) | |
| tree | d813e10a754ccc55af0905f05f6f9085d51de51c | |
| parent | 51b21408870fbcd2e59c806a24082d9bdd5c5e84 (diff) | |
| download | vimium-3a64a851201a78db2c30b47fca266c81bdb860d4.tar.bz2 | |
fix bugs in KeydownEvents so that correct keyup events will be handled
| -rw-r--r-- | content_scripts/vimium_frontend.coffee | 14 |
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 |
