Skip to content

Build your personal knowledge base with Trilium Notes

focus "jump to note" in new tab when there are no workspaces, #2455

zadam26602e8226fe
diff --git a/src/public/app/widgets/type_widgets/empty.js b/src/public/app/widgets/type_widgets/empty.js
index 2f35d8c3ab..6a718084e1 100644
--- a/src/public/app/widgets/type_widgets/empty.js
+++ b/src/public/app/widgets/type_widgets/empty.js
@@ -84,5 +84,11 @@ export default class EmptyTypeWidget extends TypeWidget {
.on('click', () => this.triggerCommand('hoistNote', {noteId: workspaceNote.noteId}))
);
}
+
+ if (workspaceNotes.length === 0) {
+ this.$autoComplete
+ .trigger('focus')
+ .trigger('select');
+ }
}
}