filter-topic: Fix Escape keyboard handling in "Filter topics" input.

Previously, pressing Esc while the "Filter topics" input was empty would
de-focus the input. Pressing Esc again would trigger the
"BACK TO CHANNEL" action, hiding the zoomed topic. However, this
behavior was broken as the input was not triggering any blur event,
making Esc a noop.

This commit restores the expected behavior by ensuring the blur event is
properly triggered, allowing Esc to function as intended.
This commit is contained in:
Maneesh Shukla
2025-07-19 00:22:18 +05:30
committed by Tim Abbott
parent aef9f1d331
commit 021d6cb169

View File

@@ -389,6 +389,7 @@ export function clear_topic_search(e: JQuery.Event): void {
search_pill_widget?.clear(true);
const $input = $("#topic_filter_query");
$input.trigger("blur");
// Since the `clear` function of the search_pill_widget
// takes care of clearing both the text content and the
// pills, we just need to trigger an input event on the