MDL-48064 atto_editor: Expand event subscription for saving selection
This commit is contained in:
+4
-4
@@ -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);
|
||||
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
+4
-4
@@ -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);
|
||||
|
||||
|
||||
+4
-4
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user