From d3b9b254292bc4f024e32b91c740255f740af482 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20Kr=C3=B6g?= Date: Sun, 16 Feb 2020 23:15:25 +0100 Subject: [PATCH] Search if the search input is not empty after page loads Firefox remembers input on the same page if a normal reload is performed. In this case the results for the search term should be shown automatically. --- config/jsdoc/api/template/static/scripts/main.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/config/jsdoc/api/template/static/scripts/main.js b/config/jsdoc/api/template/static/scripts/main.js index ca2ddb64b4..e9d7e604b5 100644 --- a/config/jsdoc/api/template/static/scripts/main.js +++ b/config/jsdoc/api/template/static/scripts/main.js @@ -123,6 +123,9 @@ $(function () { // Search Items searchInput.addEventListener('input', queueSearch); + if (searchInput.value) { + doSearch(searchInput.value); + } // Toggle when click an item element $('.navigation').on('click', '.toggle', function (e) {