Closed Bug 1173583 Opened 9 years ago Closed 9 years ago

Make autocompletion from the username field work outside of <form>

Categories

(Toolkit :: Password Manager, defect, P1)

defect
Points:
5

Tracking

()

RESOLVED FIXED
mozilla45
Tracking Status
firefox45 --- fixed

People

(Reporter: MattN, Assigned: akrawchyk, Mentored)

References

(Blocks 1 open bug, )

Details

(Whiteboard: [lang=js])

Attachments

(1 file)

onUsernameInput currently does: ` var acForm = acInputField.form ` _autoCompleteSearchAsync currently does: ` let form = aElement.form; ` Both of these doesn't work if the input isn't in a field. These method needs to be able to get a FormLike for the username field. In the meantime, autocomplete for username fields outside of a real <form> won't work.
Flags: firefox-backlog+
_autoCompleteSearchAsync really just needs the form action origin which we know for FormLikes is the same as the form origin.
Depends on: 1192081
Blocks: 1193404
Flags: qe-verify?
Priority: -- → P1
Whiteboard: [fxprivacy]
We can fix this using the new API added in bug 1192081: `form = FormLikeFactory.createFromField(inputElement);` onUsernameInput code to be changed: https://mxr.mozilla.org/mozilla-central/source/toolkit/components/passwordmgr/LoginManagerContent.jsm?rev=87cace3f3eac&mark=246,249-252,512-514#494 _autoCompleteSearchAsync code to be changed: https://mxr.mozilla.org/mozilla-central/source/toolkit/components/passwordmgr/LoginManagerContent.jsm?rev=87cace3f3eac&mark=246,249-252,512-514#243 Tests can be added to toolkit/components/passwordmgr/test/test_basic_form_autocomplete.html: e.g. add a fake "form" with a <div>: ` <div id="form11"> <input type="text" name="uname" id="uname11"> <input type="password" name="pword" id="pword11"> <button type="submit">Submit</button> </form> ` to test <form>-less autocomplete.
Mentor: MattN+bmo
Flags: qe-verify? → qe-verify-
Whiteboard: [fxprivacy] → [fxprivacy] [lang=js]
Priority: P1 → P2
Priority: P2 → P4
Priority: P4 → P1
Whiteboard: [fxprivacy] [lang=js] → [lang=js]
No longer blocks: 1193404
Bug 1173583 - Make autocompletion from the username field work outside of <form>. r=MattN
Attachment #8680857 - Flags: review?(MattN+bmo)
Sorry about the delay. I'll try look at this ASAP. End-of-cycle work has been distracting me.
Assignee: nobody → akrawchyk
Status: NEW → ASSIGNED
Comment on attachment 8680857 [details] MozReview Request: Bug 1173583 - Make autocompletion from the username field work outside of <form>. r=MattN https://reviewboard.mozilla.org/r/23687/#review21799 Perfect! Thanks!
Attachment #8680857 - Flags: review?(MattN+bmo) → review+
Hi Andrew, would you be interested in working on other password manager bugs? * Bug 1058438 is a bit bigger but not overly complex and would cleanup quite a bit of custom code. * Bug 1217134 involves a bit of CSS and markup and is nice polish for a feature we'd like to ship. You can find me as MattN on IRC if you would like other suggestions or help. Thanks
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla45
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: