From 8881e6a3bb7288340985a1d5c45f4b2f43a10832 Mon Sep 17 00:00:00 2001 From: Dan Niles <56271899+dan-niles@users.noreply.github.com> Date: Sun, 31 Mar 2024 13:29:09 +0530 Subject: [PATCH] Fix bug for empty search box on initial ZIM load #1083 (#1237) Signed off by @dan-niles --- www/js/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/js/app.js b/www/js/app.js index 121980f86..8956129a1 100644 --- a/www/js/app.js +++ b/www/js/app.js @@ -192,7 +192,7 @@ const searchArticle = document.getElementById('searchArticles') searchArticle.addEventListener('click', function () { var prefix = document.getElementById('prefix').value; // Do not initiate the same search if it is already in progress - if (appstate.search.prefix === prefix && !/^(cancelled|complete)$/.test(appstate.search.status)) return; + if (prefix !== '' && appstate.search.prefix === prefix && !/^(cancelled|complete)$/.test(appstate.search.status)) return; document.getElementById('welcomeText').style.display = 'none'; document.querySelector('.kiwix-alert').style.display = 'none'; document.getElementById('searchingArticles').style.display = '';