MDL-48006 Atto autosave: Never restore text that is empty.
This commit is contained in:
+2
-1
@@ -864,7 +864,8 @@ EditorAutosave.prototype = {
|
||||
if (response_json.error || typeof response_json.result === 'undefined') {
|
||||
Y.log('Error occurred recovering draft text: ' + response_json.error, 'debug', LOGNAME_AUTOSAVE);
|
||||
this.showMessage(M.util.get_string('errortextrecovery', 'editor_atto'), NOTIFY_WARNING, RECOVER_MESSAGE_TIMEOUT);
|
||||
} else if (response_json.result !== this.textarea.get('value')) {
|
||||
} else if (response_json.result !== this.textarea.get('value') &&
|
||||
response_json.result !== '') {
|
||||
Y.log('Autosave text found - recover it.', 'debug', LOGNAME_AUTOSAVE);
|
||||
this.recoverText(response_json.result);
|
||||
}
|
||||
|
||||
+2
-2
File diff suppressed because one or more lines are too long
+2
-1
@@ -858,7 +858,8 @@ EditorAutosave.prototype = {
|
||||
|
||||
if (response_json.error || typeof response_json.result === 'undefined') {
|
||||
this.showMessage(M.util.get_string('errortextrecovery', 'editor_atto'), NOTIFY_WARNING, RECOVER_MESSAGE_TIMEOUT);
|
||||
} else if (response_json.result !== this.textarea.get('value')) {
|
||||
} else if (response_json.result !== this.textarea.get('value') &&
|
||||
response_json.result !== '') {
|
||||
this.recoverText(response_json.result);
|
||||
}
|
||||
this._fireSelectionChanged();
|
||||
|
||||
+2
-1
@@ -160,7 +160,8 @@ EditorAutosave.prototype = {
|
||||
if (response_json.error || typeof response_json.result === 'undefined') {
|
||||
Y.log('Error occurred recovering draft text: ' + response_json.error, 'debug', LOGNAME_AUTOSAVE);
|
||||
this.showMessage(M.util.get_string('errortextrecovery', 'editor_atto'), NOTIFY_WARNING, RECOVER_MESSAGE_TIMEOUT);
|
||||
} else if (response_json.result !== this.textarea.get('value')) {
|
||||
} else if (response_json.result !== this.textarea.get('value') &&
|
||||
response_json.result !== '') {
|
||||
Y.log('Autosave text found - recover it.', 'debug', LOGNAME_AUTOSAVE);
|
||||
this.recoverText(response_json.result);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user