Skip to content

Build your personal knowledge base with Trilium Notes

fix "show recent note" button, closes #3051

zadam201ef7fcd5a8
diff --git a/package-lock.json b/package-lock.json
index d3ef59b3e5..2c239ffd0a 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "trilium",
- "version": "0.54.0-beta",
+ "version": "0.54.2",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "trilium",
- "version": "0.54.0-beta",
+ "version": "0.54.2",
"hasInstallScript": true,
"license": "AGPL-3.0-only",
"dependencies": {
diff --git a/src/public/app/services/note_autocomplete.js b/src/public/app/services/note_autocomplete.js
index d7b27f4f32..c84a41dd39 100644
--- a/src/public/app/services/note_autocomplete.js
+++ b/src/public/app/services/note_autocomplete.js
@@ -5,7 +5,7 @@ import noteCreateService from './note_create.js';
import treeService from './tree.js';
import froca from "./froca.js";
-// this key needs to have this value so it's hit by the tooltip
+// this key needs to have this value, so it's hit by the tooltip
const SELECTED_NOTE_PATH_KEY = "data-note-path";
const SELECTED_EXTERNAL_LINK_KEY = "data-external-link";
@@ -89,6 +89,11 @@ function showRecentNotes($el) {
$el.setSelectedNotePath("");
$el.autocomplete("val", "");
$el.trigger('focus');
+
+ // simulate pressing down arrow to trigger autocomplete
+ const e = $.Event('keydown');
+ e.which = 40; // arrow down
+ $el.trigger(e);
}
function initNoteAutocomplete($el, options) {
diff --git a/src/public/app/widgets/type_widgets/empty.js b/src/public/app/widgets/type_widgets/empty.js
index 2e3fd97f99..6e4cf8399c 100644
--- a/src/public/app/widgets/type_widgets/empty.js
+++ b/src/public/app/widgets/type_widgets/empty.js
@@ -63,8 +63,6 @@ export default class EmptyTypeWidget extends TypeWidget {
appContext.tabManager.getActiveContext().setNote(suggestion.notePath);
});
- noteAutocompleteService.showRecentNotes(this.$autoComplete);
-
this.$workspaceNotes = this.$widget.find('.workspace-notes');
super.doRender();