From c3e1d80b8f507d4e06adfae540eae88ca074ebb1 Mon Sep 17 00:00:00 2001 From: Hazel Noack Date: Fri, 11 Jul 2025 11:42:15 +0200 Subject: [PATCH] focus input element on loading --- frontend/index.html | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/frontend/index.html b/frontend/index.html index 6e9d1a2..57d2ad9 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -13,6 +13,7 @@

+
@@ -54,9 +55,17 @@ } Array.from(document.querySelectorAll(".phrases")).forEach(element => { - titleChanger(element); + titleChanger(element); }) + + document.addEventListener('DOMContentLoaded', function() { + Array.from(document.querySelectorAll('input')).forEach(element => { + console.log(element) + element.focus(); + }) + }); + document.addEventListener('DOMContentLoaded', function() { const marqueeElement = document.body; let xPosition = 0;