focus on editor area
This commit is contained in:
parent
4a4a688da4
commit
86a7fee5e9
|
@ -8,7 +8,7 @@
|
||||||
},
|
},
|
||||||
"package": {
|
"package": {
|
||||||
"productName": "snotes-deck",
|
"productName": "snotes-deck",
|
||||||
"version": "0.0.6"
|
"version": "0.0.7"
|
||||||
},
|
},
|
||||||
"tauri": {
|
"tauri": {
|
||||||
"allowlist": {
|
"allowlist": {
|
||||||
|
|
|
@ -41,6 +41,7 @@ let searchState = SearchState.EMPTY;
|
||||||
/**
|
/**
|
||||||
* Saves the note.
|
* Saves the note.
|
||||||
* Or updates an existing note depending on editor state
|
* Or updates an existing note depending on editor state
|
||||||
|
* TODO: save note when switching to prevent data loss
|
||||||
*/
|
*/
|
||||||
async function saveNote() {
|
async function saveNote() {
|
||||||
if (createNoteContentEl && createNoteTagEl) {
|
if (createNoteContentEl && createNoteTagEl) {
|
||||||
|
@ -345,6 +346,7 @@ function openNote(note: Note) {
|
||||||
currentNoteId = note.id as number;
|
currentNoteId = note.id as number;
|
||||||
// switch state
|
// switch state
|
||||||
editorState = EditorState.EDITING;
|
editorState = EditorState.EDITING;
|
||||||
|
createNoteContentEl.focus();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue