Ignore arrow key navigation when modifier keys held
This commit is contained in:
parent
d9485bbb40
commit
891e52f4b9
@ -47,6 +47,7 @@ class ArrowkeyNavigation extends Extension {
|
|||||||
(function($){
|
(function($){
|
||||||
$(document).keyup(function(e) {
|
$(document).keyup(function(e) {
|
||||||
if($(e.target).is('input', 'textarea')){ return; }
|
if($(e.target).is('input', 'textarea')){ return; }
|
||||||
|
if (e.metaKey || e.ctrlKey || e.altKey || e.shiftKey) { return; }
|
||||||
if (e.keyCode == 37) { window.location.href = '{$prev_url}'; }
|
if (e.keyCode == 37) { window.location.href = '{$prev_url}'; }
|
||||||
else if (e.keyCode == 39) { window.location.href = '{$next_url}'; }
|
else if (e.keyCode == 39) { window.location.href = '{$next_url}'; }
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user