mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-03-30 07:23:39 +02:00
also prevent websites from catching keyup keys (fixes dict.leo.org)
This commit is contained in:
@@ -681,7 +681,7 @@ vimperator.Events = function() //{{{
|
|||||||
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 is need for sites like msn.com which focus the input field on keydown
|
||||||
this.onKeyDown = function(event)
|
this.onKeyUpOrDown = function(event)
|
||||||
{
|
{
|
||||||
if (vimperator.hasMode(vimperator.modes.ESCAPE_ONE_KEY) || vimperator.hasMode(vimperator.modes.ESCAPE_ALL_KEYS) || isFormElemFocused())
|
if (vimperator.hasMode(vimperator.modes.ESCAPE_ONE_KEY) || vimperator.hasMode(vimperator.modes.ESCAPE_ALL_KEYS) || isFormElemFocused())
|
||||||
return true;
|
return true;
|
||||||
@@ -689,7 +689,8 @@ vimperator.Events = function() //{{{
|
|||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
window.addEventListener("keydown", this.onKeyDown, true);
|
window.addEventListener("keydown", this.onKeyUpOrDown, true);
|
||||||
|
window.addEventListener("keyup", this.onKeyUpOrDown, true);
|
||||||
|
|
||||||
this.progressListener =
|
this.progressListener =
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user