mirror of
https://github.com/moodle/moodle.git
synced 2025-03-14 04:30:15 +01:00
MDL-45425 editor_atto: Check for change selections asynchronously
This commit is contained in:
parent
5140fac5da
commit
ee37639542
@ -981,11 +981,15 @@ EditorSelection.prototype = {
|
||||
this.updateOriginal();
|
||||
}, this);
|
||||
|
||||
Y.delegate(['keyup', 'focus'], this._hasSelectionChanged, document.body, '#' + this.editor.get('id'), this);
|
||||
Y.delegate(['keyup', 'focus'], function(e) {
|
||||
Y.soon(Y.bind(this._hasSelectionChanged, this, e));
|
||||
}, document.body, '#' + this.editor.get('id'), 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', this._hasSelectionChanged, document.body, '#' + this.editor.get('id'), {
|
||||
Y.delegate('gesturemoveend', function(e) {
|
||||
Y.soon(Y.bind(this._hasSelectionChanged, this, e));
|
||||
}, document.body, '#' + this.editor.get('id'), {
|
||||
standAlone: true
|
||||
}, this);
|
||||
|
||||
@ -1591,6 +1595,7 @@ Y.Base.mix(Y.M.editor_atto.Editor, [EditorFilepicker]);
|
||||
"yui-throttle",
|
||||
"moodle-core-notification-dialogue",
|
||||
"moodle-editor_atto-rangy",
|
||||
"handlebars"
|
||||
"handlebars",
|
||||
"timers"
|
||||
]
|
||||
});
|
||||
|
File diff suppressed because one or more lines are too long
@ -976,11 +976,15 @@ EditorSelection.prototype = {
|
||||
this.updateOriginal();
|
||||
}, this);
|
||||
|
||||
Y.delegate(['keyup', 'focus'], this._hasSelectionChanged, document.body, '#' + this.editor.get('id'), this);
|
||||
Y.delegate(['keyup', 'focus'], function(e) {
|
||||
Y.soon(Y.bind(this._hasSelectionChanged, this, e));
|
||||
}, document.body, '#' + this.editor.get('id'), 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', this._hasSelectionChanged, document.body, '#' + this.editor.get('id'), {
|
||||
Y.delegate('gesturemoveend', function(e) {
|
||||
Y.soon(Y.bind(this._hasSelectionChanged, this, e));
|
||||
}, document.body, '#' + this.editor.get('id'), {
|
||||
standAlone: true
|
||||
}, this);
|
||||
|
||||
@ -1586,6 +1590,7 @@ Y.Base.mix(Y.M.editor_atto.Editor, [EditorFilepicker]);
|
||||
"yui-throttle",
|
||||
"moodle-core-notification-dialogue",
|
||||
"moodle-editor_atto-rangy",
|
||||
"handlebars"
|
||||
"handlebars",
|
||||
"timers"
|
||||
]
|
||||
});
|
||||
|
@ -90,11 +90,15 @@ EditorSelection.prototype = {
|
||||
this.updateOriginal();
|
||||
}, this);
|
||||
|
||||
Y.delegate(['keyup', 'focus'], this._hasSelectionChanged, document.body, '#' + this.editor.get('id'), this);
|
||||
Y.delegate(['keyup', 'focus'], function(e) {
|
||||
Y.soon(Y.bind(this._hasSelectionChanged, this, e));
|
||||
}, document.body, '#' + this.editor.get('id'), 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', this._hasSelectionChanged, document.body, '#' + this.editor.get('id'), {
|
||||
Y.delegate('gesturemoveend', function(e) {
|
||||
Y.soon(Y.bind(this._hasSelectionChanged, this, e));
|
||||
}, document.body, '#' + this.editor.get('id'), {
|
||||
standAlone: true
|
||||
}, this);
|
||||
|
||||
|
@ -11,7 +11,8 @@
|
||||
"yui-throttle",
|
||||
"moodle-core-notification-dialogue",
|
||||
"moodle-editor_atto-rangy",
|
||||
"handlebars"
|
||||
"handlebars",
|
||||
"timers"
|
||||
]
|
||||
},
|
||||
"moodle-editor_atto-plugin": {
|
||||
|
Loading…
x
Reference in New Issue
Block a user