From 549252f3a3ed649c17bca58c0f0ccda023eeeb48 Mon Sep 17 00:00:00 2001 From: Jaco Greeff Date: Wed, 7 Apr 2021 12:04:03 +0300 Subject: [PATCH] Re-add auto-focus --- index.html | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/index.html b/index.html index ddfc1ef33..28e73568f 100644 --- a/index.html +++ b/index.html @@ -77,6 +77,7 @@ window.top.location.href = window.location.href; } + const search = document.getElementById('search'); const style = document.createElement('style'); const table = document.getElementById('table'); @@ -203,6 +204,8 @@ } else { fillAddresses(); } + + search.focus(); } } @@ -268,14 +271,10 @@ Promise.all(metaJson.map(({ url }) => isUp(`https://${url}`))) ]); - document.getElementById('buttons').style.display = 'block'; - fillTable('sites'); - - const search = document.getElementById('search'); - search.addEventListener('input', onSearch); search.style.display = 'block'; - search.focus(); + document.getElementById('buttons').style.display = 'block'; + fillTable('sites'); } main();