This commit is contained in:
zadam 2020-07-24 00:02:15 +02:00
parent 0eb77e43e2
commit a36022d8c1
2 changed files with 4 additions and 4 deletions

View File

@ -49,6 +49,8 @@ async function createNote(parentNoteId, options = {}) {
window.cutToNote.removeSelection();
}
await ws.waitForMaxKnownSyncId();
if (options.activate) {
const activeTabContext = appContext.tabManager.getActiveTabContext();
await activeTabContext.setNote(note.noteId);
@ -62,7 +64,7 @@ async function createNote(parentNoteId, options = {}) {
}
const noteEntity = await treeCache.getNote(note.noteId);
const branchEntity = treeCache.getBranchId(branch.branchId);
const branchEntity = treeCache.getBranch(branch.branchId);
return {
note: noteEntity,

View File

@ -126,9 +126,7 @@ export default class EditableTextTypeWidget extends AbstractTextTypeWidget {
const noteComplement = await treeCache.getNoteComplement(note.noteId);
await this.spacedUpdate.allowUpdateWithoutChange(() => {
if (noteComplement.content) {
this.textEditor.setData(noteComplement.content);
}
this.textEditor.setData(noteComplement.content || "");
});
}