Modify

Opened 11 years ago

Closed 7 years ago

#11213 closed defect (fixed)

The username input doesn't have focus when the page loads

Reported by: Ryan J Ollos Owned by: Steffen Hoffmann
Priority: normal Component: AccountManagerPlugin
Severity: minor Keywords:
Cc: Trac Release: 0.11

Description (last modified by Ryan J Ollos)

Tested with Trac 0.11 and Trac 1.0.2. The focus is placed on the #username input in 0.11, but not in Trac 1.0.2. The patch that follows has been tested in both Trac 0.11 and 1.0.2 and works correctly for both cases.

Attachments (1)

t11213.diff (1.0 KB) - added by Ryan J Ollos 11 years ago.
Patch against r13290 of the trunk.

Download all attachments as: .zip

Change History (10)

comment:1 Changed 11 years ago by Ryan J Ollos

Description: modified (diff)

Changed 11 years ago by Ryan J Ollos

Attachment: t11213.diff added

Patch against r13290 of the trunk.

comment:2 Changed 11 years ago by Ryan J Ollos

The /reset_password page has the same issue, and we should set the focus on #old_password_chg when navigating to /prefs/account.

Last edited 11 years ago by Ryan J Ollos (previous) (diff)

comment:3 Changed 11 years ago by Steffen Hoffmann

In 13323:

AccountManagerPlugin: Set sensible focus to an input field on page load, refs #11213 and #11215.

Template improvements are done too, mainly following valuable suggestions by
Jun and Ryan - thanks to both of you.

comment:4 in reply to:  description Changed 11 years ago by Steffen Hoffmann

Replying to rjollos:

... has been tested in both Trac 0.11 and 1.0.2 and works correctly for both cases.

Thank you very much for taking care.

comment:5 Changed 11 years ago by Ryan J Ollos

I'm not seeing that this causes a problem, but for consistency we might want to remove the [0] on the two remaining instances:

user@ubuntu:~/Workspace/trachacks.git$ grep -R "\[0\].focus()" accountmanagerplugin/trunk
accountmanagerplugin/trunk/acct_mgr/templates/verify_email.html:        $('#token')[0].focus();
accountmanagerplugin/trunk/acct_mgr/templates/login.html:        $('#username')[0].focus();

comment:6 Changed 9 years ago by Steffen Hoffmann

Status: newaccepted

comment:7 Changed 9 years ago by Steffen Hoffmann

Trac Release: 0.11

comment:8 Changed 8 years ago by Ryan J Ollos

In 15038:

0.5dev: Remove unnecessary index operation

Refs #11213.

comment:9 Changed 7 years ago by Ryan J Ollos

Resolution: fixed
Status: acceptedclosed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Steffen Hoffmann.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.