Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed enter key conflict #2549

Merged
merged 1 commit into from
May 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading