MDL-45338 editor_atto: Correct gesturemoveend listening
Delegate gesturemoveend rather than listen to ensure adequate event filters and that we apply to only the correct editor.
This commit is contained in:
+1
-1
@@ -985,7 +985,7 @@ EditorSelection.prototype = {
|
||||
|
||||
// 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.one(Y.config.doc.body).on('gesturemoveend', this._hasSelectionChanged, {
|
||||
Y.delegate('gesturemoveend', this._hasSelectionChanged, document.body, '#' + this.editor.get('id'), {
|
||||
standAlone: true
|
||||
}, this);
|
||||
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
@@ -980,7 +980,7 @@ EditorSelection.prototype = {
|
||||
|
||||
// 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.one(Y.config.doc.body).on('gesturemoveend', this._hasSelectionChanged, {
|
||||
Y.delegate('gesturemoveend', this._hasSelectionChanged, document.body, '#' + this.editor.get('id'), {
|
||||
standAlone: true
|
||||
}, this);
|
||||
|
||||
|
||||
+1
-1
@@ -94,7 +94,7 @@ EditorSelection.prototype = {
|
||||
|
||||
// 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.one(Y.config.doc.body).on('gesturemoveend', this._hasSelectionChanged, {
|
||||
Y.delegate('gesturemoveend', this._hasSelectionChanged, document.body, '#' + this.editor.get('id'), {
|
||||
standAlone: true
|
||||
}, this);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user