From 86a7fee5e9a7799e8282544f86229fde321ed684 Mon Sep 17 00:00:00 2001 From: catto Date: Wed, 17 Apr 2024 15:11:47 +0200 Subject: [PATCH] focus on editor area --- src-tauri/tauri.conf.json | 2 +- src/main.ts | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 17d54d9..c6477d1 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -8,7 +8,7 @@ }, "package": { "productName": "snotes-deck", - "version": "0.0.6" + "version": "0.0.7" }, "tauri": { "allowlist": { diff --git a/src/main.ts b/src/main.ts index e64ad36..83f27bb 100644 --- a/src/main.ts +++ b/src/main.ts @@ -41,6 +41,7 @@ let searchState = SearchState.EMPTY; /** * Saves the note. * Or updates an existing note depending on editor state + * TODO: save note when switching to prevent data loss */ async function saveNote() { if (createNoteContentEl && createNoteTagEl) { @@ -345,6 +346,7 @@ function openNote(note: Note) { currentNoteId = note.id as number; // switch state editorState = EditorState.EDITING; + createNoteContentEl.focus(); } }