mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-27 01:33:04 +00:00
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:
parent
85e0b8d284
commit
d03bc79a78
1 changed files with 7 additions and 0 deletions
|
@ -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) {
|
||||
// prev links - left arrow key
|
||||
if(e.which == '37') {
|
||||
|
|
Loading…
Reference in a new issue