Merge branch 'MDL-45239-master' of git://github.com/andrewnicols/moodle
This commit is contained in:
+5
@@ -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));
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
+5
@@ -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));
|
||||
|
||||
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user