MDL-52825 atto: Ignore out of bounds event targets
This commit is contained in:
+9
-4
@@ -1952,10 +1952,15 @@ 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.
|
||||
this.editor.on('gesturemoveend', function(e) {
|
||||
Y.soon(Y.bind(this._hasSelectionChanged, this, e));
|
||||
}, {
|
||||
standAlone: true
|
||||
}, this);
|
||||
|
||||
// Ignore the event if the target is not part of the current editor.
|
||||
if (!this._wrapper.contains(e.target._node)) {
|
||||
return;
|
||||
}
|
||||
Y.soon(Y.bind(this._hasSelectionChanged, this, e));
|
||||
}, {
|
||||
standAlone: true
|
||||
}, this);
|
||||
|
||||
return this;
|
||||
},
|
||||
|
||||
+2
-2
File diff suppressed because one or more lines are too long
+9
-4
@@ -1939,10 +1939,15 @@ 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.
|
||||
this.editor.on('gesturemoveend', function(e) {
|
||||
Y.soon(Y.bind(this._hasSelectionChanged, this, e));
|
||||
}, {
|
||||
standAlone: true
|
||||
}, this);
|
||||
|
||||
// Ignore the event if the target is not part of the current editor.
|
||||
if (!this._wrapper.contains(e.target._node)) {
|
||||
return;
|
||||
}
|
||||
Y.soon(Y.bind(this._hasSelectionChanged, this, e));
|
||||
}, {
|
||||
standAlone: true
|
||||
}, this);
|
||||
|
||||
return this;
|
||||
},
|
||||
|
||||
+9
-4
@@ -97,10 +97,15 @@ 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.
|
||||
this.editor.on('gesturemoveend', function(e) {
|
||||
Y.soon(Y.bind(this._hasSelectionChanged, this, e));
|
||||
}, {
|
||||
standAlone: true
|
||||
}, this);
|
||||
|
||||
// Ignore the event if the target is not part of the current editor.
|
||||
if (!this._wrapper.contains(e.target._node)) {
|
||||
return;
|
||||
}
|
||||
Y.soon(Y.bind(this._hasSelectionChanged, this, e));
|
||||
}, {
|
||||
standAlone: true
|
||||
}, this);
|
||||
|
||||
return this;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user