Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

search: Deactivate narrow on deleting the last search pill.

Ryan Rehmana7dc0ed816a5
diff --git a/static/js/search_pill_widget.js b/static/js/search_pill_widget.js
index e5ea4b08aab..eff58dfe391 100644
--- a/static/js/search_pill_widget.js
+++ b/static/js/search_pill_widget.js
@@ -5,6 +5,13 @@ exports.initialize = function () {
const container = $('#search_arrows');
exports.widget = search_pill.create_pills(container);
+ exports.widget.onPillRemove(function () {
+ if (exports.widget.items().length === 0) {
+ ui_util.change_tab_to('#home');
+ narrow.deactivate();
+ }
+ });
+
exports.widget.createPillonPaste(function () {
return false;
});