MDL-48064 atto_editor: Check if activeElement is child node in isActive
This commit is contained in:
+2
-1
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
+2
-1
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
+2
-1
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user