The tab key after typing the password skips straight to 'login', missing the checkbox for persistent login. Perhaps that can be fixed?

Comments

bjaspan’s picture

Status: Active » Postponed (maintainer needs more info)

Which web browser and OS? Tabbing goes to the checkbox for me on FF3/Mac and Safari/Mac.

Flying Drupalist’s picture

It occurs on Opera/FF/Chrome in Vista. Though my problem might have to do with the fact that I'm using it in a LoginToboggan javascript box?

markus_petrux’s picture

Maybe related to tabindex. Maybe it should be set based on what's present in existing form fields, which may happen if someone else altered the login form before the hook reaches the PL module. ¿?

markus_petrux’s picture

Title: Tab doesn't select checkbox » Assign tabindex dynamically based on existing form elements
Category: support » feature
Status: Postponed (maintainer needs more info) » Active

One possible way to address this would to dynamically set the tabindex of the remember me checkbox. However, this will have a dependency on the order of modules are loaded/executed. So ideas are welcome.

markus_petrux’s picture

Version: 6.x-1.4-beta2 » 6.x-1.x-dev
markus_petrux’s picture

Status: Active » Fixed

Well, I have committed a change to the hook_form_alter() that deals with the login form to should fix this issue. You can try the code from the latest 6.x-1.x-dev snapshot that should be available soon, probably on midnight. Or checking out from CVS.

Explanation: the new hook_form_alter() implementation in PL now just adds the "Remember me" checkbox, but also adds an after_build callback. This one is executed by FAPI after all modules have altered the form, and here we can now adjust the weight and tabindex attributes of the "Remember me" checkbox so that it is always one element before the submit button.

Please, feel free to re-open if it doesn't work as expected. ;-)

markus_petrux’s picture

BTW, the particular commit that implements this fix can be found here:

http://drupal.org/cvs?commit=202538

markus_petrux’s picture

This fix should also be available in the BETA5 package.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.