What is the purpose of passwordInput.focus(); ?

I'm running a site with a theme running jQuery 1.9 and passwordInput.focus(); seems to pull focus back to the password input field all the time, regardless of whether the password meets policy compliance or not and means you can't do anything else on the page. This behaviour does not happen in any Drupal supported version of jQuery as far as I can see.

I commented out the line (28) and nothing seemed to break and password_policy then works with jQuery 1.9. Is this focus line needed?

Comments

erikwebb’s picture

I personally don't think it needs to be there. It's probably leftover from an old implementation. Care to supply a patch to review?

johnennew’s picture

Status: Active » Needs review
StatusFileSize
new462 bytes

sure, patch attached.

erikwebb’s picture

Title: focus call in JS with jQuery 1.9 » Remove JS focus call
Category: support » feature
Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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