fix: mobile autofill from native suggestion#428
Conversation
|
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! |
|
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: |
|
Hello! Our team is also hoping this gets fixed. Any chance the maintainers can look into this PR? |
|
Also hoping for a fix for this 🤞 |
|
Same here, waiting for the fix 🙏🏼 |
|
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! |
|
@hogiyogi597 when will this be merged ? |
| onKeyDown: handleKeyDown, | ||
| onPaste: handlePaste, | ||
| autoComplete: 'off', | ||
| maxLength: 1, |
There was a problem hiding this comment.
Is it necessary to remove maxLength for this to work? Hoping it does not break other cases where you paste an arbitrary value
There was a problem hiding this comment.
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.
|
Hey @hogiyogi597 Sorry for the delay here I might have missed the notification for the PR. I just have one question rest looks good |
|
@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. |
|
Hey @hogiyogi597 I tested it on my end as well and |
|
@all-contributors please add @hogiyogi597 for code |
|
I've put up a pull request to add @hogiyogi597! 🎉 |
|
Great work @hogiyogi597 ! |
What does this PR do?
Provides a fix for mobile browsers to autofill codes directly from their native message notifications.
This should resolve this issue as well: Autofill OTP from SMS does not work properly in iOS Chrome #322
Any background context you want to provide?
Pretty much just used @weiner-rakuten 's solution from this pull request but on the latest version.
Screenshots and/or Live Demo
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