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)
Toolkit
Password Manager
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+
Reporter | ||
Comment 1•9 years ago
|
||
_autoCompleteSearchAsync really just needs the form action origin which we know for FormLikes is the same as the form origin.
Updated•9 years ago
|
Reporter | ||
Comment 2•9 years ago
|
||
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]
Updated•9 years ago
|
Priority: P1 → P2
Updated•9 years ago
|
Priority: P2 → P4
Reporter | ||
Updated•9 years ago
|
Priority: P4 → P1
Whiteboard: [fxprivacy] [lang=js] → [lang=js]
Assignee | ||
Comment 3•9 years ago
|
||
Bug 1173583 - Make autocompletion from the username field work outside of <form>. r=MattN
Attachment #8680857 -
Flags: review?(MattN+bmo)
Assignee | ||
Comment 4•9 years ago
|
||
Reporter | ||
Comment 5•9 years ago
|
||
Sorry about the delay. I'll try look at this ASAP. End-of-cycle work has been distracting me.
Reporter | ||
Updated•9 years ago
|
Assignee: nobody → akrawchyk
Status: NEW → ASSIGNED
Reporter | ||
Comment 6•9 years ago
|
||
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+
Reporter | ||
Comment 8•9 years ago
|
||
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
Comment 9•9 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox45:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla45
You need to log in
before you can comment on or make changes to this bug.
Description
•