From: Malte Bublitz Date: Sun, 2 Oct 2022 20:20:07 +0000 (+0200) Subject: new-tab: Timeout für Fokus X-Git-Url: https://git.rt3x.de/?a=commitdiff_plain;h=b7dbe36b46d250977cc406e66609fffe0a37eacd;p=startseite.malte70.de.git new-tab: Timeout für Fokus --- diff --git a/js/new-tab.js b/js/new-tab.js index d33d765..efe1ffe 100644 --- a/js/new-tab.js +++ b/js/new-tab.js @@ -23,6 +23,9 @@ window.onload = function() { * Set focus to search */ document.querySelector("input[type=search]").focus(); + setTimeout(() => { + document.querySelector("input[type=search]").focus(); + }, 100); /** * Redirect if an URL was entered in the search form @@ -34,4 +37,4 @@ window.onload = function() { event.preventDefault(); } }); -}; \ No newline at end of file +};