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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user