Fix broken close button

Signed-off-by: Johannes Marbach <n0-0ne+github@mailbox.org>
This commit is contained in:
Johannes Marbach 2026-03-24 15:17:22 +01:00
parent 8fb380d465
commit 4f0eba6355

View file

@ -65,12 +65,7 @@ search backend.
// Dispose any existing popover.
//
{
let popover = bootstrap.Popover.getInstance($targetSearchInput[0]);
if (popover !== null) {
popover.dispose();
}
}
disposePopover($targetSearchInput);
//
// Check if we need to do a search at all.
@ -106,7 +101,7 @@ search backend.
.attr("aria-label", "Close")
.on("click", () => {
$targetSearchInput.val("");
$targetSearchInput.trigger("change");
disposePopover($targetSearchInput);
})
)
);
@ -178,6 +173,13 @@ search backend.
// Helpers
//
const disposePopover = ($targetSearchInput) => {
const popover = bootstrap.Popover.getInstance($targetSearchInput[0]);
if (popover !== null) {
popover.dispose();
}
}
const renderResult = (data, index, $container) => {
// Add the main result's page title.
$container.append($("<div>")