Skip to content

Commit 285e85a

Browse files
authored
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.
1 parent c309285 commit 285e85a

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

static/js/learn.js

+7
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,13 @@ jQuery(document).ready(function() {
223223
});
224224
});
225225

226+
jQuery('input').keydown(function (e) {
227+
// left and right arrow keys
228+
if (e.which == '37' || e.which == '39') {
229+
e.stopPropagation();
230+
}
231+
});
232+
226233
jQuery(document).keydown(function(e) {
227234
// prev links - left arrow key
228235
if(e.which == '37') {

0 commit comments

Comments
 (0)