Merge branch 'main' into refactor/byline

This commit is contained in:
quenousimporte 2023-10-19 12:25:10 +02:00
commit 540531a711
1 changed files with 7 additions and 13 deletions

20
main.js
View File

@ -1107,22 +1107,16 @@ function downloadnotes()
function inserttodo() function inserttodo()
{ {
filter.placeholder = "Text..."; var text = prompt("Text:");
filter.value = ""; if (text)
filteredlist.hidden = true;
searchdialog.hidden = false;
filter.focus();
filter.select();
filter.onkeydown = function()
{ {
if (event.key === "Enter") var todo = getnote("todo");
todo.content += "\n" + text;
if (todo == currentnote)
{ {
event.preventDefault(); seteditorcontent(todo.content, true);
searchdialog.hidden = true;
getnote("todo").content += "\n" + filter.value;
datachanged();
} }
datachanged();
} }
} }