Skip to content

Commit

Permalink
Automatically show recent notes when creating a new tab.
Browse files Browse the repository at this point in the history
  • Loading branch information
SiriusXT committed Oct 30, 2024
1 parent 1ba5130 commit 6911158
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/public/app/widgets/type_widgets/empty.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ export default class EmptyTypeWidget extends TypeWidget {
.on('click', () => this.triggerCommand('hoistNote', {noteId: workspaceNote.noteId}))
);
}

// Automatically trigger autocomplete on focus, which can achieve:
// 1. Automatically display suggestions when $el is focused, without needing to input any text.
// 2. Automatically show recent notes when creating a new tab.
Expand All @@ -92,6 +93,7 @@ export default class EmptyTypeWidget extends TypeWidget {
e.which = 40; // arrow down
this.$autoComplete.trigger(e);
});

this.$autoComplete
.trigger('focus')
.trigger('select');
Expand Down

0 comments on commit 6911158

Please sign in to comment.