fixes #28696 Return to the default content when .search-input is empty -Add a validation when input search is empty on top of 'startSearch()'

This commit is contained in:
Willy Aguirre 2015-10-01 13:30:35 -05:00
parent 7f9c4aaa09
commit 777518d844

View File

@ -715,6 +715,15 @@
}
function startSearch() {
$(".search-input").on("keyup",function() {
if ($(this).val().length === 0) {
window.history.replaceState("", "std - Rust", "?search=");
$('#main.content').removeClass('hidden');
$('#search.content').addClass('hidden');
}
});
var keyUpTimeout;
$('.do-search').on('click', search);
$('.search-input').on('keyup', function() {