GetSimple Support Forum
Why is automatic focus on first input disabled? - Printable Version

+- GetSimple Support Forum (http://get-simple.info/forums)
+-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3)
+--- Forum: General Questions and Problems (http://get-simple.info/forums/forumdisplay.php?fid=16)
+--- Thread: Why is automatic focus on first input disabled? (/showthread.php?tid=1512)



Why is automatic focus on first input disabled? - leenm - 2011-04-02

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.


Why is automatic focus on first input disabled? - mvlcek - 2011-04-02

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, ...


Why is automatic focus on first input disabled? - ccagle8 - 2011-04-02

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)