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

additional bottom gap between the last input box and the keyboard #2027

Open
ajunjunandtmac opened this issue Mar 19, 2024 · 1 comment
Open

Comments

@ajunjunandtmac
Copy link

ajunjunandtmac commented Mar 19, 2024

SDK Version: v6.5.11
Platform: SwiftUI 2.0

I noticed that you added the following two lines of code to the file IQKeyboardManager+Position.swift in the commit SHA 048178a.
kbFrame.origin.y -= rootControllerConfiguration.beginSafeAreaInsets.bottom
kbFrame.size.height += rootControllerConfiguration.beginSafeAreaInsets.bottom
This will cause an additional bottom gap between the last input box and the keyboard.

Could you please reconsider whether these two lines of code are necessary?
Thank you so much

Attachment is a swiftUI demo
SwiftUI+IQ.zip

screen recording with origin SDK
https://github.com/hackiftekhar/IQKeyboardManager/assets/14208608/f74ddfa7-c7cf-49cd-8321-7c5754fa0ee2

screen recording with the related code deleted
https://github.com/hackiftekhar/IQKeyboardManager/assets/14208608/e9fdc408-edd2-43f9-a973-111b6a6534a5

@ajunjunandtmac ajunjunandtmac changed the title additional bottom gap between the last text and the keyboard additional bottom gap between the last input box and the keyboard Mar 19, 2024
@hackiftekhar
Copy link
Owner

@ajunjunandtmac Those lines are necessary if someone has put a bottom constraint with safe area layout guide.

When keyboard appears and we change rootView frame, the safe area margin becomes zero. Due to this, the last field get's hidden a little bit behind the keyboard, that's why we are adding safe area's bottom so that in those cases too the keyboard will not hide the textField.

This issue will probably not happen with scrollView

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants