Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Credentials] Autofill when elements are in shadow (#592)
Currently if a form contains elements that are within shadow root, the auto scanner misses out on all the elements of the form, and fails to categorize the inputs, although it does pierce through the shadow and find the hidden input element that was clicked on. This PR expands that a bit more: When any of the input elements are clicked, scanner tries to find the parent form (using getParentForm), getParentForm code was modified to traverse through the shadow boundary, and find the enclosing form element, The found parent form is then passed to findEligibleInputs, which was also modified to find other related inputs in the form that are hidden. TLDR; This way essentially we do a two way scan - identify the clicked input which is in the shadow, traverse up the form and find the closest form and then build out the rest of the form from there.
- Loading branch information