mirror of https://github.com/zulip/zulip.git
897bfb8b95
This change was only required for the search pills enabled search. As there is a valid use-case where the user might want to remove just the latest pill(s) and then narrow. This wasn't possible previously because, the typeahead was looked up every time the backspace key was pressed. And since the only way to narrow in search is through the enter key, if the user entered it then the searchbox would get updated with the first suggestion in the typeahead. The alternative for the user would be to first lose focus on the searchbox (by clicking outside) the focus again which doesn't generate the typeahead. Then only the enter key would be available for narrowing. We do not display the typeahead after the search pills are created. This is done just to match the behaviour for the deletion of pills case too. We use this approach and we don't just change the line in `search.js` from `helpOnEmptyStrings: true` to `helpOnEmptyStrings: !page_params.searchpills enabled` because we still need to provide suggestions for '', on initial lookup or every time the empty input searchbox with search pills present gains focus. |
||
---|---|---|
.. | ||
bootstrap | ||
bootstrap-notify | ||
bootstrap-typeahead | ||
jquery-idle | ||
marked |