1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-22 08:05:46 +01:00

fixed msn.com

This commit is contained in:
Martin Stubenschrott
2007-09-12 15:45:28 +00:00
parent 5ead69ea6a
commit 70c690e411
2 changed files with 15 additions and 0 deletions

View File

@@ -703,6 +703,20 @@ 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.hasMode(vimperator.modes.ESCAPE_ONE_KEY) && !vimperator.hasMode(vimperator.modes.ESCAPE_ALL_KEYS)) ||
(vimperator.hasMode(vimperator.modes.ESCAPE_ALL_KEYS) && !vimperator.hasMode(vimperator.modes.ESCAPE_ONE_KEY)) ||
isFormElemFocused())
return true;
event.preventDefault();
event.stopPropagation();
return false;
}
window.addEventListener("keydown", this.onKeyDown, true);
this.progressListener =
{
QueryInterface: function(aIID)