mirror of https://github.com/zulip/zulip.git
Go to Home view if user selects an empty search.
(imported from commit 056ba499e16cce686b4ac60dcd282b26f43ab802)
This commit is contained in:
parent
2a1678a1d3
commit
72f65070f3
|
@ -352,6 +352,10 @@ exports.stream = function () {
|
|||
};
|
||||
|
||||
exports.activate = function (operators, opts) {
|
||||
if (operators.length === 0) {
|
||||
return exports.deactivate();
|
||||
}
|
||||
|
||||
opts = $.extend({}, {
|
||||
then_select_id: home_msg_list.selected_id(),
|
||||
select_first_unread: false,
|
||||
|
|
|
@ -350,9 +350,7 @@ exports.initialize = function () {
|
|||
// operators. (The reason the other actions don't call
|
||||
// this codepath is that they first all blur the box to
|
||||
// indicate that they've done what they need to do)
|
||||
if (search_query_box.val().trim()) {
|
||||
narrow.activate(narrow.parse(search_query_box.val()));
|
||||
}
|
||||
narrow.activate(narrow.parse(search_query_box.val()));
|
||||
search_query_box.blur();
|
||||
update_buttons_with_focus(false);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue