Merge branch 'MDL-48064-m28-master' of https://github.com/dthies/moodle into MOODLE_28_STABLE
This commit is contained in:
+6
-5
@@ -1504,15 +1504,15 @@ EditorSelection.prototype = {
|
||||
this.updateOriginal();
|
||||
}, this);
|
||||
|
||||
Y.delegate(['keyup', 'focus', 'mouseleave'], function(e) {
|
||||
this.editor.on(['keyup', 'focus'], function(e) {
|
||||
Y.soon(Y.bind(this._hasSelectionChanged, this, e));
|
||||
}, document.body, '#' + this.editor.get('id'), this);
|
||||
}, this);
|
||||
|
||||
// To capture both mouseup and touchend events, we need to track the gesturemoveend event in standAlone mode. Without
|
||||
// standAlone, it will only fire if we listened to a gesturemovestart too.
|
||||
Y.delegate('gesturemoveend', function(e) {
|
||||
this.editor.on('gesturemoveend', function(e) {
|
||||
Y.soon(Y.bind(this._hasSelectionChanged, this, e));
|
||||
}, document.body, '#' + this.editor.get('id'), {
|
||||
}, {
|
||||
standAlone: true
|
||||
}, this);
|
||||
|
||||
@@ -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
+6
-5
@@ -1492,15 +1492,15 @@ EditorSelection.prototype = {
|
||||
this.updateOriginal();
|
||||
}, this);
|
||||
|
||||
Y.delegate(['keyup', 'focus', 'mouseleave'], function(e) {
|
||||
this.editor.on(['keyup', 'focus'], function(e) {
|
||||
Y.soon(Y.bind(this._hasSelectionChanged, this, e));
|
||||
}, document.body, '#' + this.editor.get('id'), this);
|
||||
}, this);
|
||||
|
||||
// To capture both mouseup and touchend events, we need to track the gesturemoveend event in standAlone mode. Without
|
||||
// standAlone, it will only fire if we listened to a gesturemovestart too.
|
||||
Y.delegate('gesturemoveend', function(e) {
|
||||
this.editor.on('gesturemoveend', function(e) {
|
||||
Y.soon(Y.bind(this._hasSelectionChanged, this, e));
|
||||
}, document.body, '#' + this.editor.get('id'), {
|
||||
}, {
|
||||
standAlone: true
|
||||
}, this);
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
+6
-5
@@ -90,15 +90,15 @@ EditorSelection.prototype = {
|
||||
this.updateOriginal();
|
||||
}, this);
|
||||
|
||||
Y.delegate(['keyup', 'focus', 'mouseleave'], function(e) {
|
||||
this.editor.on(['keyup', 'focus'], function(e) {
|
||||
Y.soon(Y.bind(this._hasSelectionChanged, this, e));
|
||||
}, document.body, '#' + this.editor.get('id'), this);
|
||||
}, this);
|
||||
|
||||
// To capture both mouseup and touchend events, we need to track the gesturemoveend event in standAlone mode. Without
|
||||
// standAlone, it will only fire if we listened to a gesturemovestart too.
|
||||
Y.delegate('gesturemoveend', function(e) {
|
||||
this.editor.on('gesturemoveend', function(e) {
|
||||
Y.soon(Y.bind(this._hasSelectionChanged, this, e));
|
||||
}, document.body, '#' + this.editor.get('id'), {
|
||||
}, {
|
||||
standAlone: true
|
||||
}, this);
|
||||
|
||||
@@ -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