Closed Bug 1095056 Opened 10 years ago Closed 10 years ago

Focus the FxA popup's email field

Categories

(Marketplace Graveyard :: Consumer Pages, defect, P2)

Avenir
defect

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: mstriemer, Assigned: mstriemer)

References

Details

The FxA popup should automatically focus the email field when it loads. I'm not sure what the right event is to listen for to do the focusing. Setting `autofocus` on the input doesn't seem to work, probably because when the page loads it's just the splash screen that's visible.
Assignee: nobody → mstriemer
(In reply to Mark Striemer [:mstriemer] from comment #0)
> The FxA popup should automatically focus the email field when it loads. I'm
> not sure what the right event is to listen for to do the focusing. Setting
> `autofocus` on the input doesn't seem to work, probably because when the
> page loads it's just the splash screen that's visible.

Yeah, you'll need to make sure the `<input>` element is in the HTML sent from the server. Then hide the element of screen and just use JS to set a class to toggle the `<input>`'s visibility.
Alternatively, when just call `document.querySelector('input[email]').focus()` on page load (but make sure it's visible).
https://github.com/mozilla/fireplace/commit/edc5c9e81bd755aed9d730eefe0997a1c5283b19
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Verified as fixed in FF36(Win7) in marketplace-dev.allizom.org
Postfix screencast: http://screencast.com/t/wGROiJnDPIuL
Closing bug.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.