Merge pull request #4980 from FinnStutzenstein/fixLostConfigEditorValues

Fixed lost cofig values from editor fields
This commit is contained in:
Finn Stutzenstein 2019-09-05 09:02:54 +02:00 committed by GitHub
commit 8ff03044de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -322,7 +322,10 @@ export class ConfigFieldComponent extends BaseComponent implements OnInit {
} }
}); });
editor.on('Remove', ev => { editor.on('Remove', ev => {
if (ev.target.getContent() !== this.translatedValue) { // Do not save empty values on remove. This prevents losing the value on e.g.
// fast navigation, when the editor is not fully loaded. Then the content is empty
// and would trigger an update with empty data.
if (ev.target.getContent() && ev.target.getContent() !== this.translatedValue) {
this.update(ev.target.getContent()); this.update(ev.target.getContent());
} }
}); });