There are 2 fixes here:
1. do not overwrite the changes to the HTML source when we do an autosave.
2. Move the Atto notifications alert to the containing div so it aligns properly for either view.
* @chainable
*/
saveDraft: function() {
- this.updateOriginal();
+ // Only copy the text from the div to the textarea if the textarea is not currently visible.
+ if (!this.editor.get('hidden')) {
+ this.updateOriginal();
+ }
var newText = this.textarea.get('value');
if (newText !== this.lastText) {
this.messageOverlay = Y.Node.create('<div class="editor_atto_notification"></div>');
this.messageOverlay.hide(true);
- this._wrapper.append(this.messageOverlay);
+ this.textarea.get('parentNode').append(this.messageOverlay);
this.messageOverlay.on('click', function() {
this.messageOverlay.hide(true);