From 21e9f81089a6952263d89142b031238cb70bd917 Mon Sep 17 00:00:00 2001 From: Jaco Greeff Date: Wed, 7 Apr 2021 11:23:53 +0300 Subject: [PATCH] Keep search in focus (#224) --- index.html | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/index.html b/index.html index 54f1cbab8..98f49cab4 100644 --- a/index.html +++ b/index.html @@ -78,6 +78,7 @@ const style = document.createElement('style'); const table = document.getElementById('table'); + const search = document.getElementById('search'); document.head.appendChild(style); @@ -202,6 +203,8 @@ } else { fillAddresses(); } + + search.focus(); } } @@ -267,14 +270,11 @@ 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();