Skip to content

Commit

Permalink
fixed arrow left and right issue with quiz input fields
Browse files Browse the repository at this point in the history
  • Loading branch information
zubairraeen committed Nov 1, 2024
1 parent 7b7ffda commit 319c23d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions js/qsm-quiz.js
Original file line number Diff line number Diff line change
Expand Up @@ -2019,13 +2019,13 @@ jQuery(document).keydown(function(event) {
return;
}
}
if ([39, 37, 13, 9].includes(event.keyCode) && jQuery('textarea:focus').length === 0) {
if ([39, 37, 13, 9].includes(event.keyCode) && jQuery('textarea:focus, input[type="text"]:focus, input[type="email"]:focus, input[type="number"]:focus').length === 0) {
event.preventDefault();
}
if (event.keyCode === 39) {
if (event.keyCode === 39 && jQuery('textarea:focus, input[type="text"]:focus, input[type="email"]:focus, input[type="number"]:focus').length === 0 ) {
jQuery('.qsm-quiz-container.qsm-recently-active').find('.mlw_next:visible').click();
}
if (event.keyCode === 37) {
if (event.keyCode === 37 && jQuery('textarea:focus, input[type="text"]:focus, input[type="email"]:focus, input[type="number"]:focus').length === 0 ) {
jQuery('.qsm-quiz-container.qsm-recently-active').find('.mlw_previous:visible').click();
}
if (event.keyCode === 13 && jQuery('textarea:focus').length === 0) {
Expand Down

0 comments on commit 319c23d

Please sign in to comment.