catamphetamine / react-phone-number-input

React component for international phone number input
http://catamphetamine.gitlab.io/react-phone-number-input/
MIT License
915 stars 193 forks source link

countryCallingCodeEditable Bug #435

Closed FlamurMMT closed 8 months ago

FlamurMMT commented 8 months ago

Hi @catamphetamine, I believe there's a bug with the countryCallingCodeEditable={false} prop. When you set it to true you can indeed not backspace and delete it which is good but if you put the cursor at the start of the input or between, you can then add a value and edit the country code or delete the input including the country code.

I've attached a example:

https://github.com/catamphetamine/react-phone-number-input/assets/105735053/3d969fbf-d98c-46c0-8983-20d8166091e9

catamphetamine commented 8 months ago

Hi. It is possible that there is such bug on some Android devices when a browser app doesn't handle input caret position correctly. There's no fix for that.

FlamurMMT commented 8 months ago

It's occurring on Google Chrome (on mac), sorry I should've mentioned that in the initial comment.

catamphetamine commented 8 months ago

I see. Well, I'm on Windows so I won't be able to neither verify it nor look into it.