From 463f6ea74819682f6690d0c6e4522c1157e244bf Mon Sep 17 00:00:00 2001 From: Martin Stubenschrott Date: Fri, 2 Nov 2007 01:07:36 +0000 Subject: [PATCH] also prevent websites from catching keyup keys (fixes dict.leo.org) --- content/events.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/content/events.js b/content/events.js index b9e47942..e5ee599e 100644 --- a/content/events.js +++ b/content/events.js @@ -723,7 +723,7 @@ vimperator.Events = function() //{{{ window.addEventListener("keypress", this.onKeyPress, true); // this is need for sites like msn.com which focus the input field on keydown - this.onKeyDown = function(event) + this.onKeyUpOrDown = function(event) { if (vimperator.modes.passNextKey ^ vimperator.modes.passAllKeys || isFormElemFocused()) return true; @@ -731,7 +731,8 @@ vimperator.Events = function() //{{{ event.stopPropagation(); return false; } - window.addEventListener("keydown", this.onKeyDown, true); + window.addEventListener("keydown", this.onKeyUpOrDown, true); + window.addEventListener("keyup", this.onKeyUpOrDown, true); this.progressListener = {