Open
Bug 1399765
Opened 8 years ago
Updated 3 years ago
[Form Autofill] Handle formless form submission via URL state/location changed
Categories
(Toolkit :: Form Autofill, enhancement, P3)
Toolkit
Form Autofill
Tracking
()
NEW
| Tracking | Status | |
|---|---|---|
| firefox57 | --- | affected |
People
(Reporter: steveck, Unassigned)
References
(Blocks 1 open bug)
Details
(Whiteboard: [form autofill])
Attachments
(1 file)
|
59 bytes,
text/x-review-board-request
|
Details |
It's a follow up bug from Bug #990219 that it only handles the formlike object with real form element existed. We could not get the early form submission event if there's no form element. We'll need to listen to the state/location changed like we did in password manager[1]. Maybe we can add the event listener only when valid forms existed after handler collectFormFields.
[1] https://dxr.mozilla.org/mozilla-beta/rev/fa820231d3a1bad2fd1b5d1e1d571f1ace2a0354/toolkit/components/passwordmgr/LoginManagerContent.jsm#75-112
Updated•8 years ago
|
Priority: -- → P3
| Comment hidden (mozreview-request) |
| Reporter | ||
Updated•8 years ago
|
Assignee: nobody → schung
| Reporter | ||
Comment 2•8 years ago
|
||
| mozreview-review | ||
Comment on attachment 8909709 [details]
Bug 1399765 - Part 1: Handle formless form submission via URL state/location changed.
https://reviewboard.mozilla.org/r/181230/#review186428
It's the first workable patch that implements a callback setup function in FormLikeFactory. It could handle earlyFormSubmit and state/location change event depends on the formlike rootElement. I'll work on the comments and test(still wondering how to implement a proper mochitest for it) later, and any suggestion is welcome!
Attachment #8909709 -
Flags: review?(schung)
| Reporter | ||
Updated•8 years ago
|
Attachment #8909709 -
Flags: review?(schung)
Comment 3•8 years ago
|
||
| mozreview-review | ||
Comment on attachment 8909709 [details]
Bug 1399765 - Part 1: Handle formless form submission via URL state/location changed.
https://reviewboard.mozilla.org/r/181230/#review186786
Steve, can you do a first commit that moves the progress listener code out of pwmgr and into FormLikeFactory without any changes to it? Then a second commit adjusts it for autofill. I would rather not fork this code and it seems like we aren't going to try get this in 56 probably.
Attachment #8909709 -
Flags: review?(MattN+bmo)
Comment 4•8 years ago
|
||
| mozreview-review | ||
Comment on attachment 8909709 [details]
Bug 1399765 - Part 1: Handle formless form submission via URL state/location changed.
https://reviewboard.mozilla.org/r/181230/#review186792
::: toolkit/modules/FormLikeFactory.jsm:60
(Diff revision 1)
> + if (!callback) {
> + continue;
> + }
> +
> + callback(rootElement);
> + this._submitCallbackMap.delete(formElement);
If we delete then we need to re-attach if the user hits back in session history.
::: toolkit/modules/FormLikeFactory.jsm:196
(Diff revision 1)
>
> this._addToJSONProperty(formLike);
> return formLike;
> },
>
> + setupProgressListener(formLike, callback) {
I would rather this was an instance method on the FormLike called registerSubmitListener which took a callback function.
Updated•8 years ago
|
Blocks: fx-form-autofill
Updated•8 years ago
|
Component: Form Manager → Form Autofill
Updated•3 years ago
|
Assignee: steveck324 → nobody
Updated•3 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•