mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 21:43:21 +00:00
navbar: Append space at the end of filter for search convenience.
As long as the current narrow isn't already a search narrow or empty, we add a single space at the end of the current filter so that the user can just press the right arrow key and begin typing their search term, instead of having to add a space themselves.
This commit is contained in:
@@ -311,7 +311,11 @@ exports.activate = function (raw_operators, opts) {
|
||||
}
|
||||
|
||||
// Put the narrow operators in the search bar.
|
||||
$('#search_query').val(Filter.unparse(operators));
|
||||
// we append a space to make searching more convenient in some cases.
|
||||
if (filter && !filter.is_search()) {
|
||||
$('#search_query').val(Filter.unparse(operators) + " ");
|
||||
}
|
||||
|
||||
search.update_button_visibility();
|
||||
|
||||
compose_actions.on_narrow(opts);
|
||||
|
||||
Reference in New Issue
Block a user