Skip to content
Browse files

MDL-26260 Fix quiz right-click prevention loophole.

  • Loading branch information...
1 parent 1aff7bb commit fa1990992c2e3f7b30eb928b7c5b700e47ec2106 @jasonilicic jasonilicic committed with timhunt
Showing with 5 additions and 5 deletions.
  1. +5 −5 mod/quiz/module.js
View
10 mod/quiz/module.js
@@ -186,11 +186,11 @@ M.mod_quiz.secure_window = {
if (window.location.href.substring(0, 4) == 'file') {
window.location = 'about:blank';
}
- Y.delegate('contextmenu', M.mod_quiz.secure_window.prevent, document.body, '*');
- Y.delegate('mousedown', M.mod_quiz.secure_window.prevent_mouse, document.body, '*');
- Y.delegate('mouseup', M.mod_quiz.secure_window.prevent_mouse, document.body, '*');
- Y.delegate('dragstart', M.mod_quiz.secure_window.prevent, document.body, '*');
- Y.delegate('selectstart', M.mod_quiz.secure_window.prevent, document.body, '*');
+ Y.delegate('contextmenu', M.mod_quiz.secure_window.prevent, document, '*');
+ Y.delegate('mousedown', M.mod_quiz.secure_window.prevent_mouse, document, '*');
+ Y.delegate('mouseup', M.mod_quiz.secure_window.prevent_mouse, document, '*');
+ Y.delegate('dragstart', M.mod_quiz.secure_window.prevent, document, '*');
+ Y.delegate('selectstart', M.mod_quiz.secure_window.prevent, document, '*');
M.mod_quiz.secure_window.clear_status;
Y.on('beforeprint', function() {
Y.one(document.body).setStyle('display', 'none');

0 comments on commit fa19909

Please sign in to comment.
Something went wrong with that request. Please try again.