mirror of
https://github.com/moodle/moodle.git
synced 2025-04-04 16:04:00 +02:00
MDL-46088 Quiz: Prevent alert when clicking in editor in secure popup
This commit is contained in:
parent
339554aa21
commit
d250083e03
@ -222,7 +222,7 @@ M.mod_quiz.secure_window = {
|
||||
Y.delegate('mousedown', M.mod_quiz.secure_window.prevent_mouse, 'body', '*');
|
||||
Y.delegate('mouseup', M.mod_quiz.secure_window.prevent_mouse, 'body', '*');
|
||||
Y.delegate('dragstart', M.mod_quiz.secure_window.prevent, document, '*');
|
||||
Y.delegate('selectstart', M.mod_quiz.secure_window.prevent, document, '*');
|
||||
Y.delegate('selectstart', M.mod_quiz.secure_window.prevent_selection, document, '*');
|
||||
Y.delegate('cut', M.mod_quiz.secure_window.prevent, document, '*');
|
||||
Y.delegate('copy', M.mod_quiz.secure_window.prevent, document, '*');
|
||||
Y.delegate('paste', M.mod_quiz.secure_window.prevent, document, '*');
|
||||
@ -246,6 +246,16 @@ M.mod_quiz.secure_window = {
|
||||
setTimeout(M.mod_quiz.secure_window.clear_status, 10);
|
||||
},
|
||||
|
||||
/**
|
||||
* Prevent the selection event without showing an alert.
|
||||
*
|
||||
* @method prevent_selection
|
||||
* @param {EventFacade} e
|
||||
*/
|
||||
prevent_selection: function(e) {
|
||||
return false;
|
||||
},
|
||||
|
||||
prevent: function(e) {
|
||||
alert(M.str.quiz.functiondisabledbysecuremode);
|
||||
e.halt();
|
||||
|
Loading…
x
Reference in New Issue
Block a user