diff options
| author | Stephen Blott | 2017-04-14 07:48:56 +0100 | 
|---|---|---|
| committer | Stephen Blott | 2017-04-18 05:50:51 +0100 | 
| commit | 4c32c0383964e178e0196a87df7fc7a4ad7f8f27 (patch) | |
| tree | 33de054047b6f87f49b060167495cd096c5a163c /content_scripts/mode.coffee | |
| parent | 40ece51a53ee4042caad7854e415de56c0c69cab (diff) | |
| download | vimium-4c32c0383964e178e0196a87df7fc7a4ad7f8f27.tar.bz2 | |
Use event.code to detect/suppress keyup events.
This avoids the possibility of leaking keyup events if the keys a
released in a different order from that in which they were pressed.
Also, replace suppressKeyupAfterEscape with this same mechanism.
This fixes a bug (in master/1.59) whereby we leak the keyup event for
`i` when entering insert mode.
TODO:
- `/`, `<Escape>` leaks a keyup event
- `i` leaks a keyup event
Diffstat (limited to 'content_scripts/mode.coffee')
| -rw-r--r-- | content_scripts/mode.coffee | 2 | 
1 files changed, 1 insertions, 1 deletions
| diff --git a/content_scripts/mode.coffee b/content_scripts/mode.coffee index 2d8cc9cc..85187b2c 100644 --- a/content_scripts/mode.coffee +++ b/content_scripts/mode.coffee @@ -82,7 +82,7 @@ class Mode          "keydown": (event) =>            return @continueBubbling unless KeyboardUtils.isEscape event            @exit event, event.target -          DomUtils.suppressKeyupAfterEscape handlerStack +          DomUtils.consumeKeyup event      # If @options.exitOnBlur is truthy, then it should be an element.  The mode will exit when that element      # loses the focus. | 
