Automatic Input Focus

Started by FourStellar, August 15, 2016, 06:46:43 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

FourStellar

Hello. I hope I'm in the right place to suggest a change to the Elliquiy website. I also develop websites as part of my day job, so I'm not only going to gripe but also suggest a solution. When I navigate to https://elliquiy.com/forums/index.php on a desktop computer, I have to hit tab 7 times to get to the user name text box or use the mouse to click in it. To automatically place focus on the user name entry box, it would be a simple matter of adding something like this bit of JavaScript:

document.getElementsByName("user").item(0).focus();

...to the startup script when no user is logged in, and users could immediately proceed with user name entry--no mouse or tabbing necessary.

I also know from my work that fulfilling requests can have unintended, negative side effects and sometimes they just don't fit the overall design, so I understand if you can't or don't want to. But I thought I would mention it nevertheless.

Thanks for your consideration!

Vekseid

Done, thank you.

If you want to help out with the overall development of the site, please consider helping out the Elkarte project, as that's what I am intending to upgrade Elliquiy to once it is ready for us.

FourStellar

Thank you kindly!

I will check out ElkArte.

mia h

or if you're supporting HTML 5 (so any recent browser), then just add the autofocus attribute to the input box and save on the javascript
If found acting like an idiot, apply Gibbs-slap to reboot system.

Vekseid

Quote from: mia h on August 16, 2016, 11:32:44 AM
or if you're supporting HTML 5 (so any recent browser), then just add the autofocus attribute to the input box and save on the javascript

The current state of SMF has me beyond caring. >_>

I've been more keen on reigning this in on my Elkarte PRs, but it's still a nasty mess.