keep focus when clicking on edit read only note

This commit is contained in:
zadam
2021-06-24 23:50:56 +02:00
parent f1a36f6cea
commit 1b9c3b0759
8 changed files with 99 additions and 83 deletions

View File

@@ -40,7 +40,6 @@ class NoteContext extends Component {
this.notePath = resolvedNotePath;
this.noteId = treeService.getNoteIdFromNotePath(resolvedNotePath);
this.readOnlyTemporarilyDisabled = false;
this.readOnlyTemporarilyDisabled = false;
this.saveToRecentNotes(resolvedNotePath);
@@ -182,7 +181,8 @@ class NoteContext extends Component {
return false;
}
if (this.note.type !== 'text' && this.note.type !== 'code') {
// "readOnly" is a state valid only for text/code notes
if (!this.note || this.note.type !== 'text' && this.note.type !== 'code') {
return false;
}