From 4c32c0383964e178e0196a87df7fc7a4ad7f8f27 Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Fri, 14 Apr 2017 07:48:56 +0100 Subject: 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: - `/`, `` leaks a keyup event - `i` leaks a keyup event --- content_scripts/mode.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'content_scripts/mode.coffee') 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. -- cgit v1.2.3