Would it be possible to make the input box have the focus immediately (without requiring a click)? I think you can just add the autofocus
attribute to the <input>
element.
The initial box (where you’d type the page name) at Form:Architecture - IFWiki already has autofocus (on Chrome on Windows 10 at least). After that, I don’t think it’s possible, as the first field is a combobox which drops down when you click it.
Sorry, I just meant the search box at the top of every page.
Now that search box is focussed unless some other element already is (for example on an initial Form page). It needed some JavaScript and I confess that ChatGPT sped up the process. Is it an improvement?
Yes it works now, thanks!
Out of curiosity, why was javascript was needed? Was it because other input boxes used the autofocus
attribute, or something else?
That’s right. I couldn’t think of any other way of having the search box focussed if and only if no other element on the page wants autofocus.