-
-
Notifications
You must be signed in to change notification settings - Fork 85
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
Unable to get the Keyboard controller to work in iPhone with multiple inputs #574
Comments
@franferns I think it happens only in latest version (1.13.x) because I re-worked the way how listeners are attached. And in new flow there could be a case when view is not mounted yet, but we are trying to attach a listener. Thank you for a detailed repo - I'll fix this bug next week. ❤️ And in a meantime you can try to use |
@franferns I fixed a problem in #575 May I ask you to test these changes and confirm whether it fixes a problem or not? 👀 |
## 📜 Description Defer attaching workelt handlers if ref is not initialized yet. ## 💡 Motivation and Context When we use `KeyboardAwareScrollView` next to `KeyboardProvider` we end up in situation when ref is not initialized yet and in this case we can not attach our handler. This is a common scenario because documentation page tells is's a valid code but developers can be confused by that fact that sample code is not working and may not want to integrate the library in the code. To fix this problem I'm deferring attaching till `ref` is initialized (`setImmediate` does the job). Also I added meaningful warning that will spot potential problems in future: <p align="center"> <img width="300" src="https://github.com/user-attachments/assets/0686fc7b-2194-4220-8289-c202416f9912"> </p> With all these changes I think a new code gets a better revision and handles more edge-cases. Closes #574 ## 📢 Changelog <!-- High level overview of important changes --> <!-- For example: fixed status bar manipulation; added new types declarations; --> <!-- If your changes don't affect one of platform/language below - then remove this platform/language --> ### JS - check `viewRef` for nullability and defer initialization if it's `null`; - check if `viewTag` is null and if it's null then print a warning. ## 🤔 How Has This Been Tested? Tested on iPhone 15 Pro. ## 📸 Screenshots (if appropriate): |Before|After| |-------|-----| |<video src="https://github.com/user-attachments/assets/f116dafb-2f67-41d7-9d57-8d3a70fd497a">|<video src="https://github.com/user-attachments/assets/d70994cb-18bf-439e-bd01-8319e209fcdd">| ## 📝 Checklist - [x] CI successfully passed - [x] I added new mocks and corresponding unit-tests if library API was changed
@kirillzyusko just checked with the commit it works fine . Thanks for your quick fix :) |
@franferns My pleasure 😊 |
Describe the bug
Unable to get the Keyboard controller to work when run on ios simulator or iphone
Code snippet
Repo for reproducing
Sample expo app.
To Reproduce
Steps to reproduce the behavior:
1.Open the my-app
2. tap on the green textbox or the red textbox keyboard pop ups and the input is hidden
Expected behavior
When clicked on the textbox which is Red or Green the the keyboard should push those inputs up . Have not been able to get this working . I have tried with the exact code given at the expo site
Screenshots
https://github.com/user-attachments/assets/9033b2ae-c60b-4485-9cbf-f57d13faba94
Smartphone (please complete the following information):
-iPhone 15 / iPhone 15 Simulator
The text was updated successfully, but these errors were encountered: