Make WordPress Core

Opened 14 years ago

Closed 14 years ago

#14031 closed defect (bug) (fixed)

Login form JavaScript focus unsets browser saved credentials

Reported by: thedeadmedic's profile TheDeadMedic Owned by:
Milestone: 3.1 Priority: normal
Severity: normal Version: 3.0.1
Component: UI Keywords: has-patch needs-testing
Focuses: Cc:


JavaScript function wp_attempt_focus empties out username form
input, not accounting for users that have used a web browser's 'save user/password' feature.

Affects Firefox 3.6.3 - other browsers not tested.

Attachments (3)

14031.diff (616 bytes) - added by wojtek.szkutnik 14 years ago.
14031.2.diff (543 bytes) - added by johnpbloch 14 years ago.
Always keep focus on the name
14031.3.diff (543 bytes) - added by JohnPBloch 14 years ago.
Fix logic

Download all attachments as: .zip

Change History (15)

#1 @wojtek.szkutnik
14 years ago

  • Cc wojtek.szkutnik@… added
  • Keywords gsoc added

#2 @wojtek.szkutnik
14 years ago

  • Keywords has-patch needs-testing added

Problem confirmed. Patch submitted.

My solution is:
if username memorized by wp -> focus on the password field
if invalid username -> clear the username field, focus on it
else if username autocompleted -> focus on the submit button

I tested it and works well

#3 @hakre
14 years ago

I like that approach, makes sense to me. Nice fix.

#4 @TheDeadMedic
14 years ago

Any updates on this? I know it's minor, but it is irritating!

#5 @stevejohnson
14 years ago

Agreed - this is damn annoying. I administer quite a few different WP sites and my only saving grace is Firefox's saved password feature. The saved password still works - but only if I REMEMBER the username I'm trying to log in as.

And yes, it's too time-consuming to look up usernames for every one of the 100+ installs I take care of.

#6 @hakre
14 years ago

Yeah this would save those who support other users with their wordpress setups a lot as the login names can now differ and the auto-complete dropdown can grow very large now.

#7 @stevejohnson
14 years ago

  • Cc sj@… added
  • Version changed from 3.0 to 3.0.1

IMHO, a fix for this should go in the next release. Two other tickets that I know of have been submitted on this same problem - #14455 and #14866

#8 @nacin
14 years ago

  • Milestone changed from Awaiting Review to 3.1

#9 @johnpbloch
14 years ago

I don't think it's such a good solution to change focus to the submit button. Most people will not notice that the focus is on the button. Instead of being annoyed that they have to type their name in again, they will be annoyed that they have to use the mouse to click submit. I see no reason to change focus away from one of the two fields.

14 years ago

Always keep focus on the name

14 years ago

Fix logic

#10 @nacin
14 years ago

  • Keywords gsoc removed

Latest patch looks good.

#11 @nacin
14 years ago

I'm also going to add a here. If you have a username already that's filled in by the browser, putting the cursor at the end is useless. Selecting it allows you to type over both fields and hit login, or just hit enter to log in.

#12 @nacin
14 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [16870]) Don't clear saved username in wp_attempt_focus. props JohnPBloch, wojtek.szkutnik. fixes #14031.

Note: See TracTickets for help on using tickets.