-
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
Text field sudden jump when text is typed using keyboard on devices with safe area. #1733
Comments
Sorry but I'm not able to reproduce the issue with the version specified. Can you please share a demo project? |
I am also facing the same issue as I recently update to iOS 14, and after dismissing the keyboard the objects on the UIView pulled up remains hidden instead of returning back to their original position. Any help would be highly appreciated! Thanks:) |
I am also experiencing same problem in iOS 14 simulator iPhone 11 Pro. I have given constraints to safe area layout guide. for textfields above the keyboard works fines but textfield below keyboard make whole view dances up and down on each key press, also the textfield below keyboard is not moving above keyboard. |
@tahamuneeb I was able to resolve the issue by changing the constraints from Safe Area Layout to View Layout:) |
@pkhurana2610 still behaving same |
This seems like to be a issue of iOS keyboard, I fixed It by disabling auto keyboard distance manager and changing constraint I am using snapkit, if anyone needs my code I will share and explain. |
same issue |
`// import Foundation @objc protocol KeyboardManagerDataSource: class { }
func keyboardWillDisappear(notification: NSNotification?) {
} This class is compatible with Snapkit and IQkeyboard manager. Just register the fields with func addField(_ field: UITextField) function and it will start working |
@i0sa in short I am giving the positions of textfield to may manager and changing bottom or top constraint based on textfield location relative to keboard |
So after checking the original issue, i found that it is caused by iOS 14 simulator, but not in my actual iOS 14 device, Can someone confirm ? |
@i0sa I don't have original device atm, but I observed same issue using iOS 13 iPhone 6s Plus |
Its happening on iOS14 device as well, if something is typed and then the keyboard closed, the (in my case) button algined to safe area jumps down |
quick workaround: align to superview rather than safe area |
Describe the bug
On certain devices, when IQKeyboardManagerSwift is used, text fields suddenly jump when text is typed into them. This appears to be an issue with safe area only, it works as expected on other devices. I was able to workaround this issue by having constraints with respect to superview rather than safe area.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Text Field should not jump when text is typed into it.
Screenshots
Versions
Xcode: 11.5
Mac OS: 10.15.4
Simulator/Device: iPhone 11 Pro Simulator, iPhone XR
Library Version: 6.5.5
The text was updated successfully, but these errors were encountered: