Merge branch 'wip-mdl-51424' of https://github.com/dthies/moodle
authorDan Poltawski <dan@moodle.com>
Tue, 29 Sep 2015 19:33:28 +0000 (20:33 +0100)
committerDan Poltawski <dan@moodle.com>
Tue, 29 Sep 2015 19:33:28 +0000 (20:33 +0100)
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();
     },
 
     /**