mirror of
https://github.com/matrix-org/matrix-spec
synced 2026-04-07 11:54:10 +02:00
Fix broken close button
Signed-off-by: Johannes Marbach <n0-0ne+github@mailbox.org>
This commit is contained in:
parent
8fb380d465
commit
4f0eba6355
|
|
@ -65,12 +65,7 @@ search backend.
|
||||||
// Dispose any existing popover.
|
// Dispose any existing popover.
|
||||||
//
|
//
|
||||||
|
|
||||||
{
|
disposePopover($targetSearchInput);
|
||||||
let popover = bootstrap.Popover.getInstance($targetSearchInput[0]);
|
|
||||||
if (popover !== null) {
|
|
||||||
popover.dispose();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Check if we need to do a search at all.
|
// Check if we need to do a search at all.
|
||||||
|
|
@ -106,7 +101,7 @@ search backend.
|
||||||
.attr("aria-label", "Close")
|
.attr("aria-label", "Close")
|
||||||
.on("click", () => {
|
.on("click", () => {
|
||||||
$targetSearchInput.val("");
|
$targetSearchInput.val("");
|
||||||
$targetSearchInput.trigger("change");
|
disposePopover($targetSearchInput);
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
@ -178,6 +173,13 @@ search backend.
|
||||||
// Helpers
|
// Helpers
|
||||||
//
|
//
|
||||||
|
|
||||||
|
const disposePopover = ($targetSearchInput) => {
|
||||||
|
const popover = bootstrap.Popover.getInstance($targetSearchInput[0]);
|
||||||
|
if (popover !== null) {
|
||||||
|
popover.dispose();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const renderResult = (data, index, $container) => {
|
const renderResult = (data, index, $container) => {
|
||||||
// Add the main result's page title.
|
// Add the main result's page title.
|
||||||
$container.append($("<div>")
|
$container.append($("<div>")
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue