Skip to content

Commit

Permalink
Merge pull request #2549 from QuizandSurveyMaster/dev-zubair
Browse files Browse the repository at this point in the history
fixed enter key conflict
  • Loading branch information
zubairraeen authored May 31, 2024
2 parents c1818f3 + af6c4a1 commit 765376f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
13 changes: 7 additions & 6 deletions js/qsm-quiz.js
Original file line number Diff line number Diff line change
Expand Up @@ -1950,13 +1950,14 @@ function qsm_question_quick_result_js(question_id, answer, answer_type = '', sho
}
}

jQuery(document).on( 'click', '.qsm-quiz-container', function() {
jQuery('.qsm-quiz-container').removeClass('qsm-recently-active');
jQuery(this).addClass('qsm-recently-active');
jQuery(document).on('click', function(event) {
if (jQuery(event.target).closest('.qsm-quiz-container').length) {
jQuery('.qsm-quiz-container').removeClass('qsm-recently-active');
jQuery(event.target).closest('.qsm-quiz-container').addClass('qsm-recently-active');
} else {
jQuery('.qsm-quiz-container').removeClass('qsm-recently-active');
}
});
if (jQuery('.qsm-quiz-container').length > 0) {
jQuery('body .qsm-quiz-container:first').addClass('qsm-recently-active');
}

jQuery(document).keydown(function(event) {
if (jQuery('.qsm-quiz-container.qsm-recently-active').length) {
Expand Down
2 changes: 1 addition & 1 deletion php/admin/options-page-questions-tab.php
Original file line number Diff line number Diff line change
Expand Up @@ -709,7 +709,7 @@ class="save-page-button button button-primary"><?php esc_html_e( 'Save Questions
<?php if ( ! class_exists ( 'QSM_AdvancedTimer' ) ) { ?>
<div class="qsm-popup-upgrade-warning">
<img src="<?php echo esc_url( QSM_PLUGIN_URL . 'php/images/info-yellow.png' ); ?>" alt="information">
<span><?php esc_html_e( 'You can set timer in each page using Advanced Timer Add-on. ', 'quiz-master-next'); echo sprintf( '<a style="margin-right: 5px;font-weight: bolder;" href="%s" target="_blank">%s</a>', esc_url( qsm_get_plugin_link( 'downloads/wordpress-quiz-timer-advanced', 'advanced-timer-popup', 'quiz_editor', 'get_addon', 'qsm_plugin_upsell' ) ), __( 'Get this add-on ', 'quiz-master-next' ) ); esc_html_e( 'and extend your quiz features.', 'quiz-master-next' ); ?></span>
<span><?php esc_html_e( 'You can set timer in each page using Advanced Timer Add-on. ', 'quiz-master-next'); echo sprintf( '<a style="margin-right: 5px;font-weight: bolder;" href="%s" target="_blank">%s</a>', esc_url( qsm_get_plugin_link( 'downloads/wordpress-quiz-timer-advanced', 'advanced-timer-popup', 'quiz_editor', 'get_addon', 'qsm_plugin_upsell' ) ), esc_html__( 'Get this add-on ', 'quiz-master-next' ) ); esc_html_e( 'and extend your quiz features.', 'quiz-master-next' ); ?></span>
</div>
<?php } ?>
</div>
Expand Down

0 comments on commit 765376f

Please sign in to comment.