Skip to content
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

ccui.TextField can't input multistage text (like chinese) in ios 13 beta7 #20050

Closed
wulv1985 opened this issue Aug 20, 2019 · 7 comments
Closed

Comments

@wulv1985
Copy link

wulv1985 commented Aug 20, 2019

  • cocos2d-x version: 3.17.2 (lua)
  • devices test on: iphone 6sp
  • developing environments
    • NDK version:
    • Xcode version: 11.0(beta)/ 10.1 (both has this problem)
    • VS version:
    • browser type and version:

Steps to Reproduce:

1.compile 3.17.2 lua test project
2.in the 69th test WebViewTest, there is a textfield which can input the url address. if the target devices is under ios13, we can input chinese. but in ios13 beta7, we can't. just no response after we press the keyboard.

@wulv1985 wulv1985 changed the title ios 13 beta7 下,TextField不能输入中文 ios 13 beta7 下,ccui.TextField不能输入中文 Aug 20, 2019
@wulv1985 wulv1985 changed the title ios 13 beta7 下,ccui.TextField不能输入中文 ccui.TextField can't input chinese in ios 13 beta7 Aug 21, 2019
@wulv1985 wulv1985 changed the title ccui.TextField can't input chinese in ios 13 beta7 ccui.TextField can't input multistage text (like chinese) in ios 13 beta7 Aug 21, 2019
@minggo
Copy link
Contributor

minggo commented Sep 29, 2019

With latest codes, i can input Chinese on iPhone11 with iOS 13. I don't know what's the problem.

@wulv1985
Copy link
Author

@minggo Sorry, i forgot to check this issue before.

  1. my solution is similar to the discussion in CCEAGLView:setMarkedText problem in iOS13 #20174 , i manage the marked text by myself.
  2. then i met the 2nd problem, when i close the IME, it open again! I found that there were several gestureRecognizer objects and subviews under main view, which were not existed in ios12 ! Remove the gestureRecognizer objects can solve the problem, but i finally decided to disable the gesture utility in main view, by return NO in function gestureRecognizerShouldBegin.
  3. then i met the 3rd problem, when i enter the game, i found that the touchEnd message was delayed. after my finger left screen, i need to wait about 0.3s to receive the touchEnd msg. by reading apple doc, i realized it might be caused by the gestureRecognizer i mention before. i set the delaysTouchesEnded property to NO in the recognizers, and then everything is ok.

i did all this only in ios13, by checking the system version.

@minggo
Copy link
Contributor

minggo commented Nov 13, 2019

Thanks for sharing it. Now it seems i resolved keyboard issue in another way. But i don't notice the 3rd problem. Does 3rd problem only happen when using TextField?

@wulv1985
Copy link
Author

yes, it only happen after i use TextField to input Chinese .

if i use TextField to input English or number, it will not happen either, because the gestureRecognizers will not appear ! it seems that the gestureRecognizers will only appear when i input Chinese

@minggo
Copy link
Contributor

minggo commented Nov 13, 2019

After you close the keyboard, does 3rd problem disappear too?

@wulv1985
Copy link
Author

no, because the gestureRecognizers will not be detached from the main view

@minggo
Copy link
Contributor

minggo commented Nov 14, 2019

Now v3 uses a subview to receive input characters, so i think it doesn't have 3rd problem in main view now.

@minggo minggo closed this as completed Nov 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants