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:
Andrew Nicols
2014-05-06 16:10:31 +08:00
parent e7efd59b51
commit eb497e26fb
4 changed files with 4 additions and 4 deletions
@@ -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);
File diff suppressed because one or more lines are too long
@@ -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
View File
@@ -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);