1
Fork 0

Auto merge of #28795 - marti1125:28696, r=alexcrichton

-Add a validation when input search is empty on top of 'startSearch()'
This commit is contained in:
bors 2015-10-02 11:04:13 +00:00
commit 5180a7ccc5

View file

@ -722,6 +722,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() {