zulip/static/third
Ryan Rehman 897bfb8b95 typeahead: Prevent lookup on backspace keyup event on searchbox.
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.
2020-06-19 16:18:52 -07:00
..
bootstrap bootstrap: Change tooltip html default to false. 2019-09-19 20:53:10 -07:00
bootstrap-notify
bootstrap-typeahead typeahead: Prevent lookup on backspace keyup event on searchbox. 2020-06-19 16:18:52 -07:00
jquery-idle Refactor to delete mousewheel.js. 2017-07-03 11:04:20 -04:00
marked markdown: Add timestamp syntax to markdown processors. 2020-05-20 14:23:55 -07:00