Skip to content

Commit

Permalink
MDL-48064 atto_editor: Expand event subscription for saving selection
Browse files Browse the repository at this point in the history
  • Loading branch information
dthies committed Nov 17, 2014
1 parent 9b9a3ab commit 8bca360
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
Loading

0 comments on commit 8bca360

Please sign in to comment.