Attempt to fix page jump upon expanding search results

This commit is contained in:
Andrew Morgan 2026-03-20 12:53:45 +00:00
parent 15f36d1934
commit 2fd3c28a7a
2 changed files with 7 additions and 1 deletions

View file

@ -179,7 +179,7 @@ search backend.
$searchResultBody.append($("<p>").append($expander));
$wrapper = $("<div>")
.addClass("collapse")
.addClass("collapse td-offline-search-results__subresults")
.attr("id", wrapper_id)
.on("hide.bs.collapse", _ => $action.text("▶ Show"))
.on("show.bs.collapse", _ => $action.text("▼ Hide"));

View file

@ -668,6 +668,12 @@ dd {
max-width: 460px;
}
.td-offline-search-results .td-offline-search-results__subresults.collapse.show {
// Prevent the first child margin from collapsing upward when Bootstrap
// finishes the collapse animation, which otherwise causes a small jump.
display: flow-root;
}
.td-offline-search-results .spinner-container {
text-align: center;
}