MDL-51424 editor_atto: Save selection and editor contents after change

This commit is contained in:
Daniel Thies 2015-09-21 08:53:16 -05:00
parent d230899db8
commit c8719db169
4 changed files with 23 additions and 2 deletions

View File

@ -1454,6 +1454,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));
}
@ -1477,6 +1481,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();
},
/**

File diff suppressed because one or more lines are too long

View File

@ -1443,6 +1443,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));
}
@ -1466,6 +1470,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();
},
/**

View 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();
},
/**