mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
fix: move checks into timeout
This commit is contained in:
@@ -487,11 +487,11 @@ app.cacheBuster = null;
|
|||||||
clearTimeout(searchTimeoutId);
|
clearTimeout(searchTimeoutId);
|
||||||
searchTimeoutId = 0;
|
searchTimeoutId = 0;
|
||||||
}
|
}
|
||||||
|
searchTimeoutId = setTimeout(function () {
|
||||||
if (inputEl.val().length < 3 || inputEl.val() === currentVal) {
|
if (inputEl.val().length < 3 || inputEl.val() === currentVal) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
currentVal = inputEl.val();
|
currentVal = inputEl.val();
|
||||||
searchTimeoutId = setTimeout(function () {
|
|
||||||
if (!inputEl.is(':focus')) {
|
if (!inputEl.is(':focus')) {
|
||||||
return quickSearchResults.addClass('hidden');
|
return quickSearchResults.addClass('hidden');
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user