Closed Bug 1659217 Opened 3 months ago Closed 2 months ago

Ensure formLike.rootElement correctly points to the nearest HTMLFormElement ancestor, if any, when a password field is inside a ShadowRoot

Categories

(Toolkit :: Password Manager, defect, P2)

defect

Tracking

()

RESOLVED FIXED
82 Branch
Tracking Status
firefox82 --- fixed

People

(Reporter: bdanforth, Assigned: bdanforth)

References

(Blocks 2 open bugs)

Details

Attachments

(1 file)

Password fields can be inside a ShadowRoot as well as inside a <form>. In at least some of these situations, when we call LoginFormFactory.createFromField (e.g. from the "DOMInputPasswordAdded" event), we don't currently find the <form>, and formLike.rootElement defaults to the document element, <html>.

This is problematic, because e.g. a page could have multiple forms, and we would not be able to associate the correct form data with any particular form when it is edited and/or submitted (i.e. formLike.rootElement is used to uniquely identify a form to manage document state).

This should be fixed for all of the Shadow DOM cases outlined in the Description of Bug 1629226.

Assignee: nobody → bdanforth
Blocks: 1629226
Status: NEW → ASSIGNED
Attachment #9170479 - Attachment description: Bug 1659217 - Ensure formLike.rootElement correctly points to the nearest HTMLFormElement ancestor, if any, when a password field is inside a ShadowRoot. → Bug 1659217 - Ensure formLike.rootElement correctly points to the nearest HTMLFormElement ancestor, if any, when a password field is inside a ShadowRoot. r=MattN
Severity: -- → S2
Priority: -- → P2
Blocks: 1659224
Pushed by abutkovits@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/bfdfb68da137
Ensure formLike.rootElement correctly points to the nearest HTMLFormElement ancestor, if any, when a password field is inside a ShadowRoot. r=MattN
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 82 Branch
Flags: qe-verify-
You need to log in before you can comment on or make changes to this bug.