search: Fix bug where exit button jumps when clicked.

This commit is contained in:
evykassirer 2024-07-12 14:45:02 -07:00 committed by Tim Abbott
parent 6f4d14ddde
commit 2e3f11134e
2 changed files with 2 additions and 7 deletions

View File

@ -96,11 +96,11 @@ export function initialize({on_narrow_search}: {on_narrow_search: OnNarrowSearch
const $searchbox_form = $("#searchbox_form");
const $pill_container = $("#searchbox-input-container.pill-container");
$(".search-input-and-pills").on("focusin", () => {
$("#searchbox_form").on("focusin", () => {
$("#searchbox-input-container").toggleClass("focused", true);
});
$(".search-input-and-pills").on("focusout", () => {
$("#searchbox_form").on("focusout", () => {
$("#searchbox-input-container").toggleClass("focused", false);
});

View File

@ -43,11 +43,6 @@
/* Leave room for the focus outline. */
margin-right: 1px;
&:focus {
/* Reduce height to leave 1px on top and bottom for the outline. */
height: calc(100% - 2px);
}
&:not(:focus-visible) {
outline: none;
}