Add isFocused info to Autofill elements.
Categories
(GeckoView :: General, defect, P1)
Tracking
(firefox71 wontfix, firefox72 affected)
People
(Reporter: jhugman, Assigned: esawin)
References
Details
(Whiteboard: [geckoview:m1911])
Currently, the amazon.co.uk sign-in form and register form are on the same page.
<!-- truncated -->
<ViewGroup idEntry="swipeRefresh" idPackage="org.mozilla.fenix.nightly" idType="id">
<FrameLayout idEntry="engineView" idPackage="org.mozilla.fenix.nightly" idType="id">
<form webDomain="www.amazon.co.uk" data-enable-mobile-account-js="true" action="https://www.amazon.co.uk/ap/register" method="post" data-fwcim-id="369de96d" novalidate="" id="ap_register_form" name="register" class="ap_ango_default fwcim-form auth-validate-form auth-clearable-form">
<!-- truncated -->
<input webDomain="www.amazon.co.uk" autofillHints="emailAddress" inputType="21" autocorrect="off" id="ap_email" name="email" type="email" maxlength="64" placeholder="Mobile number or email" autocapitalize="off"/>
<input webDomain="www.amazon.co.uk" autofillHints="password" inputType="e1" autocorrect="off" autocomplete="off" id="ap_password" name="password" type="password" maxlength="1024" placeholder="Create a password" autocapitalize="off"/>
<!-- truncated -->
</form>
<form webDomain="www.amazon.co.uk" action="https://www.amazon.co.uk/ap/signin" method="post" data-fwcim-id="4a0d320d" novalidate="" id="ap_login_form" name="signIn" class="auth-validate-form fwcim-form auth-clearable-form">
<input webDomain="www.amazon.co.uk" autofillHints="emailAddress" inputType="21" autocorrect="off" id="ap_email_login" name="email" type="email" maxlength="128" placeholder="Email (phone for mobile accounts)" autocapitalize="off"/>
<input webDomain="www.amazon.co.uk" autofillHints="password" inputType="e1" id="ap-credential-autofill-hint" name="password" type="password" maxlength="1024" autofillId="autofillId-password"/>
<!-- truncated -->
</form>
</FrameLayout>
</ViewGroup>
<!-- truncated -->
This is an XML representation of the AssistStructure.ViewNode
tree, that android hands us from GeckoView/Fenix.
Only one form is on screen at once, however the ViewNode tree is the same each time.
Either: only give the form
that is visible, or annotate the EditText
that is focused.
A service can identify the field that originated the request by calling the isFocused() method while traversing the AssistStructure object. This allows services to prepare a FillResponse with the appropriate partition data.
Returns true if this node currently had input focus at the time that the structure was collected.
This bug makes it difficult for Lockwise to support sign in to amazon properties via fenix.
It works fine on the embedded WebView in the native app.
Gecko version: 71.0a1-20191018095340
Updated•5 years ago
|
Comment 1•5 years ago
|
||
Adding to GV's November sprint.
Feature requests from Lockwise to help autofill identify password fields on a page. Eugen thinks we can support these with the new autofill refactoring bug 1591462.
Assignee | ||
Comment 2•5 years ago
•
|
||
Can you please verify whether the changes landed in bug 1591462 satisfy your requirements.
We set ViewStructure.setFocused
based on Autofill.Node.getFocused
which is controlled by DOM focus events and GeckoSession's active state.
Reporter | ||
Comment 3•4 years ago
|
||
This appears to work now, thank you.
This bug can now be closed as fixed.
Assignee | ||
Updated•4 years ago
|
Description
•