fix hotkeys triggering while text editing was focused and while lookup window not displaying
This commit is contained in:
1 parent
ad7ed951dd
commit
6fcbb1b5c4
1 file changed
+4
-2
+4
-2
@@ -1358,6 +1358,8 @@ function mine(highlight)
|
||||
|
||||
function keytest(event)
|
||||
{
|
||||
if(event.target != document.body)
|
||||
return;
|
||||
if(event.shiftKey || event.ctrlKey || event.metaKey || event.altKey)
|
||||
return;
|
||||
if(event.key == "m")
|
||||
@@ -1414,6 +1416,8 @@ function keytest(event)
|
||||
document.body.appendChild(mydiv);
|
||||
}
|
||||
}
|
||||
if(!exists_div())
|
||||
return;
|
||||
if(event.key == "n")
|
||||
{
|
||||
lookup_cancel_force();
|
||||
@@ -1423,8 +1427,6 @@ function keytest(event)
|
||||
settings.sticky = !settings.sticky;
|
||||
browser.storage.local.set({"sticky":settings.sticky});
|
||||
}
|
||||
if(!exists_div())
|
||||
return;
|
||||
if(event.keyCode == 37) // left
|
||||
{
|
||||
lookup_left();
|
||||
|
||||
Reference in new issue
Block a user