MDL-45338 editor_atto: Correct gesturemoveend listening
authorAndrew Nicols <andrew@nicols.co.uk>
Tue, 6 May 2014 08:09:54 +0000 (16:09 +0800)
committerAndrew Nicols <andrew@nicols.co.uk>
Tue, 6 May 2014 08:10:31 +0000 (16:10 +0800)
Delegate gesturemoveend rather than listen to ensure adequate event filters
and that we apply to only the correct editor.

lib/editor/atto/yui/build/moodle-editor_atto-editor/moodle-editor_atto-editor-debug.js
lib/editor/atto/yui/build/moodle-editor_atto-editor/moodle-editor_atto-editor-min.js
lib/editor/atto/yui/build/moodle-editor_atto-editor/moodle-editor_atto-editor.js
lib/editor/atto/yui/src/editor/js/selection.js

index f44f15e..f951527 100644 (file)
Binary files a/lib/editor/atto/yui/build/moodle-editor_atto-editor/moodle-editor_atto-editor-debug.js and b/lib/editor/atto/yui/build/moodle-editor_atto-editor/moodle-editor_atto-editor-debug.js differ
index 7901a74..31da1d4 100644 (file)
Binary files a/lib/editor/atto/yui/build/moodle-editor_atto-editor/moodle-editor_atto-editor-min.js and b/lib/editor/atto/yui/build/moodle-editor_atto-editor/moodle-editor_atto-editor-min.js differ
index 00cf4e4..cf955da 100644 (file)
Binary files a/lib/editor/atto/yui/build/moodle-editor_atto-editor/moodle-editor_atto-editor.js and b/lib/editor/atto/yui/build/moodle-editor_atto-editor/moodle-editor_atto-editor.js differ
index 6935ccc..d00ebe7 100644 (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);