Skip to content

Commit

Permalink
Revert "MDL-45239 editor_atto: The editor cannot be active if it is n…
Browse files Browse the repository at this point in the history
…ot the active element"

This reverts commit 05a7f9e.
  • Loading branch information
Damyon Wiese committed May 1, 2014
1 parent 066f039 commit 6e4c185
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 16 deletions.
Expand Up @@ -1001,11 +1001,6 @@ EditorSelection.prototype = {
return false;
}

// We can't be active if the editor doesn't have focus at the moment.
if (!document.activeElement || document.activeElement !== this.editor) {
return false;
}

// Check whether the range intersects the editor selection.
range.selectNode(this.editor.getDOMNode());
return range.intersectsRange(selection.getRangeAt(0));
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Expand Up @@ -996,11 +996,6 @@ EditorSelection.prototype = {
return false;
}

// We can't be active if the editor doesn't have focus at the moment.
if (!document.activeElement || document.activeElement !== this.editor) {
return false;
}

// Check whether the range intersects the editor selection.
range.selectNode(this.editor.getDOMNode());
return range.intersectsRange(selection.getRangeAt(0));
Expand Down
5 changes: 0 additions & 5 deletions lib/editor/atto/yui/src/editor/js/selection.js
Expand Up @@ -108,11 +108,6 @@ EditorSelection.prototype = {
return false;
}

// We can't be active if the editor doesn't have focus at the moment.
if (!document.activeElement || document.activeElement !== this.editor) {
return false;
}

// Check whether the range intersects the editor selection.
range.selectNode(this.editor.getDOMNode());
return range.intersectsRange(selection.getRangeAt(0));
Expand Down

0 comments on commit 6e4c185

Please sign in to comment.