diff --git a/src/public/javascripts/services/note_detail_relation_map.js b/src/public/javascripts/services/note_detail_relation_map.js
index 882e0ae25..fc29e26d9 100644
--- a/src/public/javascripts/services/note_detail_relation_map.js
+++ b/src/public/javascripts/services/note_detail_relation_map.js
@@ -402,11 +402,15 @@ $createChildNote.click(async () => {
target: 'into'
});
+ // reloading tree so that the new note appears there
+ // no need to wait for it to finish
+ treeService.reload();
+
const [x, y] = getFreePosition();
mapData.notes.push({ id: note.noteId, x, y });
- await createNoteBox(id, title, x, y);
+ await createNoteBox(note.noteId, title, x, y);
});
export default {
diff --git a/src/public/javascripts/services/tree.js b/src/public/javascripts/services/tree.js
index 9d5d85925..fe00f6d5b 100644
--- a/src/public/javascripts/services/tree.js
+++ b/src/public/javascripts/services/tree.js
@@ -482,13 +482,13 @@ async function createNote(node, parentNoteId, target, isProtected, saveSelection
await noteDetailService.saveNoteIfChanged();
+ noteDetailService.newNoteCreated();
+
const noteEntity = new NoteShort(treeCache, note);
const branchEntity = new Branch(treeCache, branch);
treeCache.add(noteEntity, branchEntity);
- noteDetailService.newNoteCreated();
-
const newNode = {
title: newNoteName,
noteId: branchEntity.noteId,
diff --git a/src/views/index.ejs b/src/views/index.ejs
index 00d880b94..cdc453d03 100644
--- a/src/views/index.ejs
+++ b/src/views/index.ejs
@@ -266,6 +266,8 @@
+
+