mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 00:12:56 +02:00
MDL-48064 atto_editor: Check if activeElement is child node in isActive
This commit is contained in:
parent
c106341098
commit
9b9a3abf9b
@ -1535,7 +1535,8 @@ EditorSelection.prototype = {
|
||||
}
|
||||
|
||||
// We can't be active if the editor doesn't have focus at the moment.
|
||||
if (!document.activeElement || Y.one(document.activeElement) !== this.editor) {
|
||||
if (!document.activeElement ||
|
||||
!(this.editor.compareTo(document.activeElement) || this.editor.contains(document.activeElement))) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
File diff suppressed because one or more lines are too long
@ -1523,7 +1523,8 @@ EditorSelection.prototype = {
|
||||
}
|
||||
|
||||
// We can't be active if the editor doesn't have focus at the moment.
|
||||
if (!document.activeElement || Y.one(document.activeElement) !== this.editor) {
|
||||
if (!document.activeElement ||
|
||||
!(this.editor.compareTo(document.activeElement) || this.editor.contains(document.activeElement))) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -121,7 +121,8 @@ EditorSelection.prototype = {
|
||||
}
|
||||
|
||||
// We can't be active if the editor doesn't have focus at the moment.
|
||||
if (!document.activeElement || Y.one(document.activeElement) !== this.editor) {
|
||||
if (!document.activeElement ||
|
||||
!(this.editor.compareTo(document.activeElement) || this.editor.contains(document.activeElement))) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user