Closed
Bug 1360374
Opened 7 years ago
Closed 7 years ago
Apply the field prediction heuristics for the elements added after DOMContentLoaded
Categories
(Toolkit :: Form Manager, defect)
Toolkit
Form Manager
Tracking
()
RESOLVED
FIXED
mozilla55
Tracking | Status | |
---|---|---|
firefox55 | --- | fixed |
People
(Reporter: selee, Assigned: selee)
References
Details
(Whiteboard: [form autofill:M3])
Attachments
(1 file)
Since it's a common case that website inserts elements after the page loaded, the prediction heuristics should apply to these new added elements to make sure all interesting element support Form Autofill feature.
Assignee | ||
Updated•7 years ago
|
Whiteboard: [form autofill:M2] → [form autofill:M3]
Comment 1•7 years ago
|
||
We discussed replacing the DOMContentLoaded listener with a "focusin" listener to delay any work as long as possible and avoid a talos regression in tp5. This will block enabling the feature by default on Nightly since due to Talos.
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment 4•7 years ago
|
||
mozreview-review |
Comment on attachment 8864413 [details] Bug 1360374 - Identify FormAutofill fields when a field is focused on.; https://reviewboard.mozilla.org/r/136102/#review139492 Thanks Sean! r=me assuming all formautofill tests pass. ::: browser/extensions/formautofill/FormAutofillContent.jsm:413 (Diff revision 2) > + if (this.getFormHandler(field)) { > + continue; > + } Add a comment about what this is about since it's not the ideal situation since ideally we would want to handle dynamic additions and check that the actual "field", not "form" were already found. Example: ``` // For now skip consider fields in forms we've already seen before even if the specific field wasn't seen before. // Ideally whether the field is already in the handler's form details would be considered. ``` Alternatively you could fix it to do the above. ::: browser/extensions/formautofill/content/FormAutofillFrameScript.js:40 (Diff revision 2) > switch (evt.type) { > - case "DOMContentLoaded": { > - let doc = evt.target; > + case "focusin": { > + let element = evt.target; Can you ensure this code is covered by mochitests by commenting out the addEventListener and ensuring tests fails? If not, please add one.
Attachment #8864413 -
Flags: review?(MattN+bmo) → review+
Assignee | ||
Comment 5•7 years ago
|
||
mozreview-review-reply |
Comment on attachment 8864413 [details] Bug 1360374 - Identify FormAutofill fields when a field is focused on.; https://reviewboard.mozilla.org/r/136102/#review139492 > Add a comment about what this is about since it's not the ideal situation since ideally we would want to handle dynamic additions and check that the actual "field", not "form" were already found. Example: > > ``` > // For now skip consider fields in forms we've already seen before even if the specific field wasn't seen before. > // Ideally whether the field is already in the handler's form details would be considered. > ``` > > Alternatively you could fix it to do the above. Thanks for the comments. I will be back here to improve it with more tests for single field change. > Can you ensure this code is covered by mochitests by commenting out the addEventListener and ensuring tests fails? If not, please add one. The mochitest fails after removing addEventListener("focusin", this); in FormAutofillFrameScript.
Comment hidden (mozreview-request) |
Assignee | ||
Comment 7•7 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=cb79f356ea2037b425a06b048164425a242e2675
Assignee | ||
Updated•7 years ago
|
Keywords: checkin-needed
Pushed by ryanvm@gmail.com: https://hg.mozilla.org/integration/autoland/rev/03c0ea04be4e Identify FormAutofill fields when a field is focused on.; r=MattN
Keywords: checkin-needed
Comment 9•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/03c0ea04be4e
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
status-firefox55:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
Assignee | ||
Updated•7 years ago
|
Updated•7 years ago
|
Flags: qe-verify-
You need to log in
before you can comment on or make changes to this bug.
Description
•