set focus() to the password input field

Want to share your OpenWrt / Gargoyle knowledge? Implemented a new feature? Let us know here.

Moderator: Moderators

hnl_dk
Moderator
Posts: 408
Joined: Mon Aug 29, 2011 12:37 pm

set focus() to the password input field

Post by hnl_dk »

Hello

It would be nice if the focus() could be set to password input field, so we do not need to use the mouse that much (or tab key).
Router: TL-WR1043ND - Gargoyle 1.5.4
AP: TL-WR1043ND - Gargoyle 1.5.4

genix
Posts: 11
Joined: Mon Nov 14, 2011 4:49 pm

Re: set focus() to the password input field

Post by genix »

here is modified login.sh (for 1.4.3) with stuff you need +autosend via enter :)
Attachments
login.zip
(1.61 KiB) Downloaded 586 times

pbix
Developer
Posts: 1373
Joined: Fri Aug 21, 2009 5:09 pm

Re: set focus() to the password input field

Post by pbix »

I put the set focus() function into login.sh in the GIT so it will be there for the next release. I did not add the autosend part since login.sh has changed quite a bit since what genix modified and I was not clear on how to merge these.

If someone will add autosend to the modern login.sh file and test it I will take a look at getting it added to the GIT.
Linksys WRT1900ACv2
Netgear WNDR3700v2
TP Link 1043ND v3
TP-Link TL-WDR3600 v1
Buffalo WZR-HP-G300NH2
WRT54G-TM

hnl_dk
Moderator
Posts: 408
Joined: Mon Aug 29, 2011 12:37 pm

Re: set focus() to the password input field

Post by hnl_dk »

Perfect, thank You very much :mrgreen:
Router: TL-WR1043ND - Gargoyle 1.5.4
AP: TL-WR1043ND - Gargoyle 1.5.4

genix
Posts: 11
Joined: Mon Nov 14, 2011 4:49 pm

Re: set focus() to the password input field

Post by genix »

Here is the diff for 1.5, works with 1.4 also
Attachments
login.sh.diff.zip
(705 Bytes) Downloaded 529 times

hnl_dk
Moderator
Posts: 408
Joined: Mon Aug 29, 2011 12:37 pm

Re: set focus() to the password input field

Post by hnl_dk »

working perfectly with 1.5.1 :mrgreen:
Router: TL-WR1043ND - Gargoyle 1.5.4
AP: TL-WR1043ND - Gargoyle 1.5.4

pbix
Developer
Posts: 1373
Joined: Fri Aug 21, 2009 5:09 pm

Re: set focus() to the password input field

Post by pbix »

I added this autosend function to the login.js file but note that Firefox already has this autosend feature built in so some will see no benefit from this. I think Chrome does too.
Linksys WRT1900ACv2
Netgear WNDR3700v2
TP Link 1043ND v3
TP-Link TL-WDR3600 v1
Buffalo WZR-HP-G300NH2
WRT54G-TM

hnl_dk
Moderator
Posts: 408
Joined: Mon Aug 29, 2011 12:37 pm

Re: set focus() to the password input field

Post by hnl_dk »

pbix wrote:I added this autosend function to the login.js file but note that Firefox already has this autosend feature built in so some will see no benefit from this. I think Chrome does too.
Yes, I am using Firefox 11.0a1.
So that is why it is working perfectly for me.

Just tried with Internet Explorer 9... here it is not working with "Enter", but it is instead working with "Tab".
Router: TL-WR1043ND - Gargoyle 1.5.4
AP: TL-WR1043ND - Gargoyle 1.5.4

genix
Posts: 11
Joined: Mon Nov 14, 2011 4:49 pm

Re: set focus() to the password input field

Post by genix »

Well, I found that using onchange event processing in password fiels is totally wrong because that event triggered not only when you pressing Enter (in FF/Chrome) but always when input field loses input focus - i.e. pressing tab key, clicking mouse in surrounding area etc.
So onchange event processing should be removed

pbix
Developer
Posts: 1373
Joined: Fri Aug 21, 2009 5:09 pm

Re: set focus() to the password input field

Post by pbix »

Since you offer no alternative are you then saying we should abandon autosend altogether? Seem like a 180 from your previous requests.
Linksys WRT1900ACv2
Netgear WNDR3700v2
TP Link 1043ND v3
TP-Link TL-WDR3600 v1
Buffalo WZR-HP-G300NH2
WRT54G-TM

Post Reply