Merge branch 'MDL-45239-master' of git://github.com/andrewnicols/moodle

This commit is contained in:
Damyon Wiese
2014-04-30 12:13:49 +08:00
4 changed files with 16 additions and 1 deletions
@@ -1001,6 +1001,11 @@ 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));
File diff suppressed because one or more lines are too long
@@ -996,6 +996,11 @@ 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));
+5
View File
@@ -108,6 +108,11 @@ 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));