Don't clear search when results load

This commit is contained in:
Hillel Coren 2016-09-19 12:12:22 +03:00
parent c7cedc53d4
commit 8a1d4d35ec

View File

@ -199,8 +199,11 @@
}
window.loadedSearchData = false;
function onSearchFocus() {
function onSearchBlur() {
$('#search').typeahead('val', '');
}
function onSearchFocus() {
$('#search-form').show();
if (!window.loadedSearchData) {
@ -319,6 +322,7 @@
// Focus the search input if the user clicks forward slash
$('#search').focusin(onSearchFocus);
$('#search').blur(onSearchBlur);
$('body').keypress(function(event) {
if (event.which == 47 && !$('*:focus').length) {