-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Scroll bug when presenting addCardViewController #942
Comments
Hi @Klingefjord, thanks for opening an issue and providing the gif. This looks like the expected behavior as far as I know. The intended behavior is for the text field to be vertically center in the remaining space not taken up by the keyboard. As a result, the card can end up offscreen. What do you think? Here is the code if you want to try experimenting with it: One option is to stop calling |
Personally I think the textfield shouldn't get centered as it looks especially weird during the card flip animation. Maybe some tweaking to the offset if the textfield is the first one underneath the card? I tried changing https://github.com/stripe/stripe-ios/blob/master/Stripe/UIViewController%2BStripe_KeyboardAvoiding.m#L111 to |
Hi @Klingefjord Thanks for taking a look, you were on the right track. We had a team discussion and decided to change our opinion and try to have the scroll view behave as natively as possible. I just opened this pull request #943 and would love for you to try it out. As I mentioned in the pull request, we don't have too much context on how this class was implemented so we should invest extra time in testing the change. |
Great! Tested your pr out, think it looks much better. |
👋 we just released v13.0.2 that includes this change. thanks for bringing it to our attention :) |
Summary
Scroll bug on addCardViewController. When textfield becomes first responder, the view scrolls autmoatically so that the card animation goes underneath the navigation bar
Code to reproduce
This is what I use to present the addCardViewController:
iOS version
11.3
Installation method
CocoaPods
SDK version
13.0.1
Other information
The text was updated successfully, but these errors were encountered: