diff --git a/docs/Release Notes/Release Notes/v0.92.8-beta.md b/docs/Release Notes/Release Notes/v0.92.8-beta.md index 4676b0d20..5cf968d24 100644 --- a/docs/Release Notes/Release Notes/v0.92.8-beta.md +++ b/docs/Release Notes/Release Notes/v0.92.8-beta.md @@ -25,6 +25,7 @@ * The following dialogs are now accessible: bulk actions, branch prefix, include note, add link, sort child notes, note type selector, move/clone to, import/export, markdown import, note revisions, info dialog. * Delete notes now requests confirmation. * Modals now have a safe margin on their bottom and are scrollable. +* [Center Search results under quick search bar](https://github.com/TriliumNext/Notes/issues/1679) ## 🌍 Internationalization diff --git a/src/public/app/widgets/quick_search.ts b/src/public/app/widgets/quick_search.ts index 3b4b7e186..2d06baafe 100644 --- a/src/public/app/widgets/quick_search.ts +++ b/src/public/app/widgets/quick_search.ts @@ -35,7 +35,7 @@ const TPL = /*html*/` -
+ `; @@ -56,15 +56,17 @@ export default class QuickSearchWidget extends BasicWidget { doRender() { this.$widget = $(TPL); - this.dropdown = Dropdown.getOrCreateInstance(this.$widget.find("[data-bs-toggle='dropdown']")[0], { - popperConfig: { - strategy: "fixed" - } - }); - this.$searchString = this.$widget.find(".search-string"); this.$dropdownMenu = this.$widget.find(".dropdown-menu"); + this.dropdown = Dropdown.getOrCreateInstance(this.$widget.find("[data-bs-toggle='dropdown']")[0], { + reference: this.$searchString[0], + popperConfig: { + strategy: "fixed", + placement: "bottom" + } + }); + this.$widget.find(".input-group-prepend").on("shown.bs.dropdown", () => this.search()); if (utils.isMobile()) {