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: mobile autofill from native suggestion #428

Merged
merged 2 commits into from
Dec 12, 2023

Conversation

hogiyogi597
Copy link
Contributor

@hogiyogi597 hogiyogi597 commented Nov 2, 2023

iOS - iPhone 12
https://github.com/devfolioco/react-otp-input/assets/25204032/57081773-1a69-43f1-92cb-ca42165d1001

Android - Pixel 7
https://github.com/devfolioco/react-otp-input/assets/25204032/02eec490-e6a6-40e2-be98-6cf627eb59cc

@hogiyogi597
Copy link
Contributor Author

I'm not sure if this is the appropriate protocol to get reviewers so I apologize in advance but I wondered if @prateek3255 or @cesarvargas00 would be available in the next few days to give this one a look?

Thanks!

@hogiyogi597
Copy link
Contributor Author

Hello! Just wanting to bump this thread a bit. I know everyone is probably busy but I don't want these changes to get lost in the GitHub ether.

Tagging for visibility:
@prateek3255 @cesarvargas00

@beforeoafterm
Copy link

Hello! Our team is also hoping this gets fixed. Any chance the maintainers can look into this PR?

@mckaymichaelis
Copy link

Also hoping for a fix for this 🤞

@alexlibak
Copy link

Same here, waiting for the fix 🙏🏼

@hogiyogi597
Copy link
Contributor Author

hogiyogi597 commented Dec 5, 2023

Hey, all! Still hoping to get this merged but need to fork the repo for now to get this issue resolved for us.

Please let me know how I can help get this merged here, thanks!

CC:
@prateek3255 @apollonian

@avtarvikas
Copy link

@hogiyogi597 when will this be merged ?
any idea ?

@@ -238,7 +251,6 @@ const OTPInput = ({
onKeyDown: handleKeyDown,
onPaste: handlePaste,
autoComplete: 'off',
maxLength: 1,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is it necessary to remove maxLength for this to work? Hoping it does not break other cases where you paste an arbitrary value

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, unfortunately with the maxLength of 1 it is truncating the rest of the input. Are there some scenarios you'd like me to test? I'd be happy to help in any way I can.

@prateek3255
Copy link
Collaborator

Hey @hogiyogi597 Sorry for the delay here I might have missed the notification for the PR. I just have one question rest looks good

@hogiyogi597
Copy link
Contributor Author

@prateek3255 Thanks for looking it over! I responded to your question above. Let me know if there is any additional testing you'd like me to perform.

@prateek3255 prateek3255 merged commit a1aed4b into devfolioco:main Dec 12, 2023
2 checks passed
@prateek3255
Copy link
Collaborator

Hey @hogiyogi597 I tested it on my end as well and isInputValid handles all the edge cases by itself anyways so we can get rid of maxLength. This is released with v3.1.1. Again thanks for your contribution and sorry for the dealy

@prateek3255
Copy link
Collaborator

@all-contributors please add @hogiyogi597 for code

Copy link
Contributor

@prateek3255

I've put up a pull request to add @hogiyogi597! 🎉

@alexlibak
Copy link

Great work @hogiyogi597 !
Just updated it at my work's repository project and autofill works with ios 💪🏼

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants