Skip to content
This repository was archived by the owner on Jun 24, 2025. It is now read-only.

Commit 60217d4

Browse files
committed
feat(quick_search): align popup to bottom-center (closes #1679)
1 parent 7fba2df commit 60217d4

2 files changed

Lines changed: 8 additions & 5 deletions

File tree

docs/Release Notes/Release Notes/v0.92.8-beta.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
* 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.
2626
* Delete notes now requests confirmation.
2727
* Modals now have a safe margin on their bottom and are scrollable.
28+
* [Center Search results under quick search bar](https://github.com/TriliumNext/Notes/issues/1679)
2829

2930
## 🌍 Internationalization
3031

src/public/app/widgets/quick_search.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const TPL = /*html*/`
3535
<button class="btn btn-outline-secondary search-button" type="button" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
3636
<span class="bx bx-search"></span>
3737
</button>
38-
<div class="dropdown-menu dropdown-menu-left tn-dropdown-list"></div>
38+
<div class="dropdown-menu tn-dropdown-list"></div>
3939
</div>
4040
<input type="text" class="form-control form-control-sm search-string" placeholder="${t("quick-search.placeholder")}">
4141
</div>`;
@@ -56,15 +56,17 @@ export default class QuickSearchWidget extends BasicWidget {
5656

5757
doRender() {
5858
this.$widget = $(TPL);
59+
this.$searchString = this.$widget.find(".search-string");
60+
this.$dropdownMenu = this.$widget.find(".dropdown-menu");
61+
5962
this.dropdown = Dropdown.getOrCreateInstance(this.$widget.find("[data-bs-toggle='dropdown']")[0], {
63+
reference: this.$searchString[0],
6064
popperConfig: {
61-
strategy: "fixed"
65+
strategy: "fixed",
66+
placement: "bottom"
6267
}
6368
});
6469

65-
this.$searchString = this.$widget.find(".search-string");
66-
this.$dropdownMenu = this.$widget.find(".dropdown-menu");
67-
6870
this.$widget.find(".input-group-prepend").on("shown.bs.dropdown", () => this.search());
6971

7072
if (utils.isMobile()) {

0 commit comments

Comments
 (0)