-
Notifications
You must be signed in to change notification settings - Fork 506
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
KeyBoard is not opening for TextFormField in some iOS devices after adding flutter-unity-view-widget #530
Comments
#164 #34 I believe there is a fix for it here @jungleesubbu |
We are seeing this in our project as well. @juicycleff Any suggestions? After we use a webview to authenticate with Google or Facebook it starts working again. This only happens while And for clarification, it's NOT a text field from Unity. It's the normal Flutter TextFormField. |
Oh that's sounds weird, but I think you can solve it by some option in your scaffold widget, or use the focusNode in the text controller. Using the project myself with a text field with no hassle. Overall, your Scaffold widget setup has a lot to do with the keyboard behavior. Hope this helps Also Flutter made some huge keyboard performance update too on iOS for flutter 2.10.0 if I remember correctly good to check that out |
@LegendAF If my above suggestion doesn't solve it, just reopen and tag me. |
Thanks for the reply @juicycleff. Here is what I am seeing. iPhone 6s, iOS 12.1 iPhone 13, iOS 15.4.1 As you can see, the keyboard does not open at all on the iPhone 6s. We found that if you were to open and then close a webview and then try to use the input, the keyboard will open as expected. This is all while running the code located at https://github.com/juicycleff/flutter-unity-view-widget/tree/master/example, which presumably is the latest example code. The only change I made for this video was in We see this same exact behavior in our code base. When we remove Do you have any ideas about what could be causing this so we could help track it down? Thanks! Example of changed code:
|
@juicycleff I can not re-open this ticket since I am not the author. |
@juicycleff The problem that's occurring is that the Flutter window is not the "key" window that receives all the keyboard input. This is a workaround that works for our use case, where we don't want or need Unity to have window focus. In ios/Runner/AppDelegate.swift, add this to application():
Then add the
Unity will take focus when it runs If someone else using flutter-unity-view-widget needs TextField use, I think it would make sense to add this to this plugin. I don't have extensive iOS experience, so there's probably a better way than through NotificationCenter. Maybe the key window focus fix would happen some time after the Unity player has been created. |
@ivanarellano thank you. Will give it and look and try to add it to the library and offcourse credits to you |
No description provided.
The text was updated successfully, but these errors were encountered: