Page MenuHomePhabricator

[native] Delay PasswordSelection autoFocus on Android
ClosedPublic

Authored by ashoat on May 26 2023, 7:57 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Jul 19, 10:47 PM
Unknown Object (File)
Wed, Jul 17, 6:18 PM
Unknown Object (File)
Wed, Jul 17, 2:19 PM
Unknown Object (File)
Sat, Jul 13, 1:56 PM
Unknown Object (File)
Sat, Jul 6, 11:48 PM
Unknown Object (File)
Wed, Jul 3, 8:05 AM
Unknown Object (File)
Jun 19 2024, 6:22 PM
Unknown Object (File)
Jun 19 2024, 6:22 PM
Subscribers

Details

Summary

While playing around with 1Password on Android, I noticed that the autofill prompt didn't appear when we autoFocused the password TextInput in PasswordSelection. However, it would appear if the user subsequently pressed / selected the TextInput manually.

Test Plan

I tested release builds with various delays for the focus on two phones: my Pixel 6a, and the older Pixel 3 in the office. 250ms consistently worked for both, while 100ms did not.

Diff Detail

Repository
rCOMM Comm
Branch
ashoat/registration
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

ashoat added inline comments.
native/account/registration/password-selection.react.js
82

It's okay to call this hook conditionally because the condition (whether the device is an Android device) is guaranteed to never change

atul added inline comments.
native/account/registration/password-selection.react.js
82

Would it make sense to add a comment here (exact text as annotation) to make it clear to future readers?

(They could probably find the diff via git blame regardless, but wouldn't hurt?)

This revision is now accepted and ready to land.May 26 2023, 10:36 AM
This revision was landed with ongoing or failed builds.May 26 2023, 10:59 AM
This revision was automatically updated to reflect the committed changes.