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
Characters duplicated when entering numbers using any Japanese Keyboard #262
Comments
It might be specific to Japanese keyboard you are using. I tried with google Japanese keyboard. And it works fine. I have an android device. |
So, it seems as though it’s specific to only iOS Japanese keyboards. |
This can also be replicated using a Japanese keyboard on a mac, using the built in Japanese keyboards provided by OSX. |
After further investigation, this issue with the iOS keyboard is present in ANY input field where its value is being formatted/modified while a user is in focus, ReactJS or otherwise. A basic input formatting example is here: https://kk8nj5m263.codesandbox.io/. This is a very large bug, well outside the scope of React and especially this library. |
is there any workaround for this ? this library is very helpful if without this bug |
@huanhuang-wang we found the best approach was, for anyone using a Japanese style input method, to only display the formatted input on blur. Unfortunately, due to the extent of the issue on iOS there was really no other workaround we could come up with. |
@jackall3n would you mind sharing a code example as to how you achieved that? Did you do that with this library? |
@donovantc sorry, I no longer have access to this code. However, the solution didn't use a library (although this library might benefit from the added feature, I'll have a think about adding something in). Basically the solution was to attach an onFocus/onBlur listener to the field, when the cursor focused on the field the component would set a state value I'm sure this library could have an additional prop named something like 'formatOnBlur' or something more intuitive with this functionality set internally. Hope that helps you with your issue. |
@jackall3n yeah, thanks for the quick feedback. I get what you mean and also +1 that it would be nice for this lib to have a prop like that. I'll keep an eye on it or do something about it but I cannot guarantee that ;) |
@donovantc haha won’t hold you to it then |
We used this solution. |
When entering into
<NumberFormat />
using any Japanese Keyboard, characters are duplicated as a user types and deletes.Found when using iOS environment.
Below is an example using the 'Live Demo' with the Japanese Kana Keyboard.
The text was updated successfully, but these errors were encountered: