From 65f55a65e89117f46cc4e13a035f03887c6256cc Mon Sep 17 00:00:00 2001 From: quenousimporte Date: Mon, 2 Oct 2023 12:50:41 +0200 Subject: [PATCH] fixed: cursor pos when creating note with tags in url --- main.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.js b/main.js index 00b8576..dbae67e 100644 --- a/main.js +++ b/main.js @@ -1321,7 +1321,8 @@ function loadstorage() currentnote = getnote(title); if (!currentnote) { - currentnote = {title: title, content: defaultheaders(title, tags)}; + var newcontent = defaultheaders(title, tags); + currentnote = {title: title, content: newcontent, pos: newcontent.length}; localdata.unshift(currentnote); } }