Open jonathan-villanueva opened 9 months ago
Post your code.
P.S. I dunno what might be the case in your case, so there won't be a solution in this thread.
<PhoneInput
data-testid="PhoneInputInput"
country="US"
value={value || undefined}
onChange={onChange}
type="tel"
defaultCountry="US"
autoFocus={true}
limitMaxLength={true}
/>
const onChange = (value: string) => {
setFormData({ ...formData, phone_number: value })
}
I see, so the bug only manifests when limitMaxLength
property is used.
I saw weird caret behavior on Android in the past years. Usually it happens in unconventional browsers that don't handle dynamic caret positioning properly. In the older years, that was Samsung Browser, for example.
I'd mark this one as "won't fix".
When entering more than the max amount of digits on Android Chrome the cursor will move back and be positioned strangely.
https://github.com/catamphetamine/react-phone-number-input/assets/34611132/f5be2258-7e69-4375-8d29-35f95865fd67