mirror of
https://github.com/moodle/moodle.git
synced 2025-04-11 19:42:35 +02:00
MDL-46088 quiz secure window: further Atto JS fixes.
This commit is contained in:
parent
d250083e03
commit
dc37223bff
@ -246,12 +246,17 @@ 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
|
||||
*/
|
||||
is_content_editable: function(n) {
|
||||
if (n.test('[contenteditable=true]')) {
|
||||
return true;
|
||||
}
|
||||
n = n.get('parentNode');
|
||||
if (n === null) {
|
||||
return false;
|
||||
}
|
||||
return M.mod_quiz.is_content_editable(n);
|
||||
},
|
||||
|
||||
prevent_selection: function(e) {
|
||||
return false;
|
||||
},
|
||||
@ -266,7 +271,7 @@ M.mod_quiz.secure_window = {
|
||||
// Left click on a button or similar. No worries.
|
||||
return;
|
||||
}
|
||||
if (e.button == 1 && e.target.test('[contenteditable=true]')) {
|
||||
if (e.button == 1 && M.mod_quiz.is_content_editable(e.target)) {
|
||||
// Left click in Atto or similar.
|
||||
return;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user