mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-04-01 17:43:33 +02: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);
|
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 =
|
this.progressListener =
|
||||||
{
|
{
|
||||||
QueryInterface: function(aIID)
|
QueryInterface: function(aIID)
|
||||||
|
|||||||
Reference in New Issue
Block a user