Fix note being read-only after viewing note in trash

This commit is contained in:
Dan Stillman 2018-10-14 23:34:32 -04:00
parent f7e9067660
commit 4aaec5f091

View file

@ -65,14 +65,15 @@
switch (val) {
case 'view':
case 'merge':
// If there's an existing editor, mark it as read-only. This allows for
// disabling an existing editable note (e.g., if there's a save error).
if (this.noteField) {
this.noteField.onInit(ed => ed.setMode('readonly'));
}
break;
case 'edit':
if (this.noteField) {
this.noteField.onInit(ed => ed.setMode('design'));
}
this.editable = true;
this.saveOnEdit = true;
this.parentClickHandler = this.selectParent;