prevents left and right keydown in input fields

If input field is in focus, keydown event to trigger navigation change should
not fire. User should expect cursor to stay in input field when using arrow keys.
This commit is contained in:
Shelane French 2018-12-20 19:22:04 -08:00 committed by GitHub
parent 85e0b8d284
commit d03bc79a78
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -223,6 +223,13 @@ jQuery(document).ready(function() {
}); });
}); });
jQuery('input').keydown(function (e) {
// left and right arrow keys
if (e.which == '37' || e.which == '39') {
e.stopPropagation();
}
});
jQuery(document).keydown(function(e) { jQuery(document).keydown(function(e) {
// prev links - left arrow key // prev links - left arrow key
if(e.which == '37') { if(e.which == '37') {