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:
parent
7f9c4aaa09
commit
777518d844
@ -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() {
|
||||
|
Loading…
Reference in New Issue
Block a user