Skip to content

Commit

Permalink
Plugin: ExerciseFocused: Block click event - refs BT#20900
Browse files Browse the repository at this point in the history
  • Loading branch information
AngelFQC committed Oct 3, 2023
1 parent 729fa01 commit 614ffea
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion plugin/exercisefocused/templates/block.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
display: block;
}
.main-question, .exercise_actions, #exercise-description {
form#exercise_form {
background-color: #FFF;
position: relative;
z-index: 1005;
Expand Down
8 changes: 8 additions & 0 deletions plugin/exercisefocused/templates/script.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,14 @@
$(window).on("blur", onBlur)
$(window).on("focus", onFocus)
$('body').on('click', 'a, button', function (e) {
var $el = $(e.target);
if (0 === $el.parents('form#exercise_form').length) {
e.preventDefault();
}
});
})
</script>
{% endif %}

0 comments on commit 614ffea

Please sign in to comment.