-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
UITextField text jumps when IQKeyboardManager switches first responder. #217
Comments
Also the jump does not happen when the Done Button is pressed. I was stepping through the KeyboardManager code and could not find anything that would suggest the behavior there. The Manager does not think that the frame has changed or anything. |
May be I need to debug swift version. FYI I always suggest developer to use objC version instead of swift because objC version is updated on a regular basis and swift is updated one or two time in quarterly year. |
Thanks for the response. Sorry for being unclear. The IQKeyboardManager code is all Objc. My project is in Swift 1.2. |
Ok, will check this weekend |
Confirm this issue! |
I have same issues with my objective c project. (latest version IQKeyboardManager ) |
I Couldn't find anything regarding the issue when I created a demo to reproduce the same issue, can someone send me the demo project. |
This happened to me in this situation: But if you tap on a textfield, type somethings then taps outside to hide keyboard. => The jumps will happened in the next time you tap on that textfield. |
Ok, got you. Will try to reproduce in your suggested conditions. |
Not able to reproduce with @trungnguyen1791 suggested conditions too, so if someone can provide me demo code then it would be great. |
I found that calling 'setNeedsLayout' and 'layoutIfNeeded' from IQKeyboardManager on viewControllers.view causes disorder the internal hierarchy of UITextField when it's border style is UITextBorderStyleNone. Setting 'layoutIfNeededOnUpdate' to NO solve the issue. FYI from now 'layoutIfNeededOnUpdate is default to NO. |
Can you please confirm that it's not jumping when library is removed. |
yup. same code with library removed works as expected (without the autoscrolling of course) |
Then please teopen this issue and upload demo project here. I'll try to
|
I have some very close issue: hierarchy and video of issue In my case it can be solved with clear |
I am using Swift 1.2. Whenever I enter text into a text field and hit the next button on the IQKeyboardManager, the manager works as expected except for an extra jump to the text in the text field that is being resigned. The text moves ~15 pixels above the Textfield, and then flashes back to the expected position.
The text moves out of the frame of the text field for a second. This behavior will only happen once for a given text field. Once it has happened, the text settles back into the TextField and does not jump upon further switching of first responder.
I made sure that my Storyboard file is anchored to the view and not the top layout guide. I also made sure that the sharedManager is enabled in the app delegate.
The text was updated successfully, but these errors were encountered: