Focus on note once created

This commit is contained in:
Joscha 2025-02-07 14:47:06 +01:00
parent 3d2941791e
commit 56ab7c2613

View file

@ -82,6 +82,7 @@ function onCreatorClose() {
function onCreatorFinish(text: string) { function onCreatorFinish(text: string) {
notes.appendNewChildNote(props.noteId, text); notes.appendNewChildNote(props.noteId, text);
ui.focusPath = pathAppend(props.path, children.value.length - 1);
onCreatorClose(); onCreatorClose();
} }
</script> </script>
@ -129,8 +130,8 @@ function onCreatorFinish(text: string) {
<div v-if="creating" class="pl-2"> <div v-if="creating" class="pl-2">
<CNoteCreator <CNoteCreator
:parent-id="props.noteId" :parent-id="props.noteId"
@close="onCreatorClose()" @close="onCreatorClose"
@finish="(text) => onCreatorFinish(text)" @finish="onCreatorFinish"
/> />
</div> </div>