Skip to content

Commit

Permalink
MDL-48064 atto_editor: Check if activeElement is child node in isActive
Browse files Browse the repository at this point in the history
  • Loading branch information
dthies committed Nov 14, 2014
1 parent c106341 commit 9b9a3ab
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
Loading

0 comments on commit 9b9a3ab

Please sign in to comment.