search: Refactor how close buttons are handled.

We refactor the following inputs to use a `placeholder-shown` CSS selector to
show/hide the close button, rather than custom JS logic:
- Filter topics field in the left sidebar
- Filter direct messages field under direct messages
- Stream message topic
This commit is contained in:
opmkumar
2024-09-24 04:34:10 +05:30
committed by GitHub
parent 5bde07c842
commit 1ddc1d2d12
7 changed files with 13 additions and 32 deletions

View File

@@ -62,11 +62,6 @@ export function _build_direct_messages_list(): vdom.Tag<PMNode> {
}
const dom_ast = pm_list_dom.pm_ul(pm_list_nodes);
if (search_term === "") {
$("#clear-direct-messages-search-button").hide();
} else {
$("#clear-direct-messages-search-button").show();
}
return dom_ast;
}