mirror of
https://github.com/matrix-org/matrix-spec
synced 2026-04-04 02:04: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.
|
||||
//
|
||||
|
||||
{
|
||||
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>")
|
||||
|
|
|
|||
Loading…
Reference in a new issue