Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Auto focus on Username input field
On the the admin side’s login page, we could focus the username field:
$('input[name="p_userid"]').focus();
Patrick.
Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.
Offline
Re: Auto focus on Username input field
+1: )
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Offline
Re: Auto focus on Username input field
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
Re: Auto focus on Username input field
Maybe a solution (html5 new attributes):
<input type="text" value="" name="p_userid" class="field" tabindex="1" id="name" autocomplete="off" autofocus="autofocus">
Username isn’t stored into input field ( autocomplete="off"
) even on focus ( autofocus="autofocus"
).
Patrick.
Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.
Offline
Re: Auto focus on Username input field
Pat64 wrote:
Maybe a solution (html5 new attributes):
<input type="text" value="" name="p_userid" class="field" tabindex="1" id="name" autocomplete="off" autofocus="autofocus">
Username isn’t stored into input field (
autocomplete="off"
) even on focus (autofocus="autofocus"
).
Why would you want to prevent the user to save the username/password on her computer ?
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
Offline
Re: Auto focus on Username input field
I don’t see any benefit to autofocusing, unless there is just single text input field on a page (like Google homepage for example). I also avoid using tabindex myself – it plays havoc with keyboard-only page navigation and is unnecessary if you’ve laid out the code properly in the first place.
Offline