-
Notifications
You must be signed in to change notification settings - Fork 24.8k
IOS TextInput bug when input Chinese Pinyin #8140
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
Conversation
By analyzing the blame information on this pull request, we identified @nicklockwood and @bnham to be potential reviewers. |
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at cla@fb.com. Thanks! |
Hmm, we've been working on fixing this issue as well. Suppressing the onChangeText callback when there is an active marked text region might be the right way to fix this problem. I'll evaluate this later today. |
@bnham ,you are more thoughtful than I am,maybe there is a better solution. |
I tried to repro this using code like this but couldn't repro the bug:
I can see how this could happen in theory. If Can you provide more sample code to illustrate the issue? |
@bnham Are you using RN0.27.2 and test it on a real ios(9.3.2) device? I create a new project ,just modificate index.ios.js as follow:
It reproduced! I made a breakpoint at RTCTextView:403, it not blocked by the |
@flare216, I see the issue now. I wasn't using v0.27.2 so I didn't see the issue originally. It turns out that this issue is caused by a regression in the way This PR works around the bug that I referenced by ignoring changes when some marked text is present in the view. The idea of not calling back to JS when a marked text range is present is an interesting idea and we might eventually do something like that later. But since we've now traced this bug down to a specific issue in a specific commit, I think it would be better for us to fix the root cause instead of applying a workaround. Therefore I'm going to close out this PR, and you can follow the fix in #8265. As a temporary workaround, you can downgrade to 0.25.1, which doesn't have this bug. |
Hi, as I commented in the related issue, this bug was fixed in 26aa27d, which is included in 0.28.0. So you should upgrade to that version. |
I'm experiencing a issue about input Chinese Pinyin.
I'm using 0.27.2,
I have the following codes:
Under the Chinese Pinyin input mode, when i input the first letter, then _onChangeText function invoked,
and then the TextInput value property changed, this lead to a "can't input Chinese" bug.
After seaching about Chinese Piyin input on ios, i fixed this issue in this patch, that is when textinput exist selected text, don't send onChange event.
But i' m not sure if i'm doing the correct thing, as in my another project using 0.25.1 does not produce this issue.