1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-06 22:04:18 +01:00

merge keyDown event handling from MAIN - helps with sites such as yahoo.com

which trap all keyDown events
This commit is contained in:
Doug Kearns
2007-09-14 04:37:45 +00:00
parent 2209703239
commit b7b1aaac0c

View File

@@ -611,6 +611,18 @@ function Events() //{{{
}
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)
{
if (vimperator.modes.passNextKey ^ vimperator.modes.passAllKeys || isFormElemFocused())
return true;
event.preventDefault();
event.stopPropagation();
return false;
}
window.addEventListener("keydown", this.onKeyDown, true);
this.progressListener =
{
QueryInterface: function(aIID)