Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix OTP autofill in iOS Safari #21482

Merged
merged 3 commits into from
Jul 5, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/styles/styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -2490,6 +2490,12 @@ const styles = {

magicCodeInputTransparent: {
color: 'transparent',
caretColor: 'transparent',
WebkitTextFillColor: 'transparent',
// After setting the input text color to transparent, it acquires the background-color.
// However, it is not possible to override the background-color directly as explained in this resource: https://developer.mozilla.org/en-US/docs/Web/CSS/:autofill
// Therefore, the transition effect needs to be delayed.
transitionDelay: '99999s',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✋ Coming from #28340

We're calculating the height of the input based on onLayout function, but when we navigate to the new page, the layout.height will return 0. Ref: facebook/react-native#10743

After come back to 2FA page, the layout.height is 52px, but we're using transitionDelay:99999s for 2FA input here, that makes the input height is still 0

},

iouAmountText: {
Expand Down