MDL-51424 editor_atto: Save selection and editor contents after change
authorDaniel Thies <dthies@ccal.edu>
Mon, 21 Sep 2015 13:53:16 +0000 (08:53 -0500)
committerDaniel Thies <dthies@ccal.edu>
Mon, 21 Sep 2015 13:53:16 +0000 (08:53 -0500)
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/commands.js

index 8ef6171..d1902ba 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 bdcd0dc..4d4f660 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 239dbd9..c98aa83 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 98e25d4..187c493 100644 (file)
@@ -57,6 +57,10 @@ EditorCommand.prototype = {
 
                 // Collapse selection so cursor is at end of inserted material.
                 selection.collapseToEnd();
+
+                // Save save selection and editor contents.
+                this.saveSelection();
+                this.updateOriginal();
             }, this, e, callback, context, args, anchorNode, anchorOffset));
         }
 
@@ -80,6 +84,9 @@ EditorCommand.prototype = {
         // The range is not collapsed; so apply callback method immediately.
         callback.apply(context, [e, args]);
 
+        // Save save selection and editor contents.
+        this.saveSelection();
+        this.updateOriginal();
     },
 
     /**