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:
@@ -722,6 +722,15 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function startSearch() {
|
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;
|
var keyUpTimeout;
|
||||||
$('.do-search').on('click', search);
|
$('.do-search').on('click', search);
|
||||||
$('.search-input').on('keyup', function() {
|
$('.search-input').on('keyup', function() {
|
||||||
|
|||||||
Reference in New Issue
Block a user