react-verification-code-input icon indicating copy to clipboard operation
react-verification-code-input copied to clipboard

Problems on iOS Safari/Cordova

Open flache opened this issue 6 years ago • 1 comments

Hi everyone, due to some iOS Safari restrictions around focusing HTMLInputElements, this module does not work on iOS Safari. Unfortunately, there is no easy fix, but it seems possible through swapping Elements and transferring values between Input Elements (So the focused input stays the same, but moves forward in the DOM tree)

In my case (I am using cordova), I was lucky since the UIWebview can be adapted, so if you are a cordova user, just set the KeyboardDisplayRequiresUserAction preference in the config.xml to false

flache avatar Jun 10 '19 11:06 flache

I just tested this on iOS 12 and it works fine. Guessing it works on iOS 13 too?

Not sure why this would be an issue, because the iOS restriction is that you can't focus an input element unless you're on a stack that was initiated due to user action. In this case, the user taps an input (that's a user action) and enters a number (that's another user input) so this library can focus the next input just fine?

dminkovsky avatar Jul 13 '20 13:07 dminkovsky