GetSimple Support Forum

Full Version: Why is automatic focus on first input disabled?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Why is line 210 in jquery.getsimple.js commented out? (GetSimple 3.0)
Code:
//$("input[type='text']:first", document.forms[0]).focus();

This is nice functionality, especially on the login page.

EDIT: to be clear, I'd like to have this back if possible. I know I can un-comment it myself, but there's probably a good reason why this is disabled.
leenm Wrote:Why is line 210 in jquery.getsimple.js commented out? (GetSimple 3.0)
Code:
//$("input[type='text']:first", document.forms[0]).focus();

This is nice functionality, especially on the login page.

EDIT: to be clear, I'd like to have this back if possible. I know I can un-comment it myself, but there's probably a good reason why this is disabled.

I suppose if it is enabled a plugin won't be able to set the focus to a specific element itself, which might be a select box or a check box. At least it would be browser dependent which focus() won, the plugin's or that of the jquery.getsimple.js.

I think that each page should set the focus to the best element - and for the login page this would be the user name field, ...
i liked this idea. I am adding a few auto-focus inputs for these pages:

index.php (login)
resetpassword.php
edit.php (create new page only)