paypal / paypal-ios

One merchant integration point for all of PayPal's services
Apache License 2.0
59 stars 27 forks source link

Native Payments Sheet Scroll View and Keyboard Error #246

Open rlomeli158 opened 8 months ago

rlomeli158 commented 8 months ago

PayPal SDK Version

Latest

Environment

Sandbox

Xcode Version

Xcode 15.2

OS Version & Device

iPhone 15 - iOS 16.4

Integration type

Swfit Package Manager

Development Processor

Intel

Describe the bug

When scrolling down on the native payments sheet, the scroll view gets messed up after the keyboard goes away. Please see my reproducing steps for more details.

To reproduce

  1. Launch Native Payments with no client ID in sandbox. This could be on the simulator or an actual device. I used the iPhone 15.
  2. Pay with Debit or Credit Card as guest
  3. Use software keyboard (iPhone keyboard instead of physical computer keyboard)
  4. Enter a few numbers in the credit card number, then click off of the form by clicking an empty space in the form. This should make your keyboard go away.
  5. Now, at the bottom of the screen you should see a bunch of white space left behind by the keyboard disappearing.
  6. You can scroll down on the white space and keep scrolling down, but you won't actual scroll down on the checkout form. You can kinda see two vertical scroll indicators here.
  7. To fix it, you have to scroll all the way up then you can scroll down with no issues.

Expected behavior

I want the keyboard to go away and for there to not be any extra white space at the bottom of the payment sheet. It should just be the other form fields. This way, if I scroll down, I can actually see the rest of the form.

Screenshots

IMG_5979

vradopp commented 8 months ago

Hey @rlomeli158

Are you able to provide a video of you reproducing the issue? Also are you using any libraries for keyboard management such as IQKeyboardManager?

rlomeli158 commented 8 months ago

Sure here you go! I am not using any custom libraries.

https://github.com/paypal/paypal-ios/assets/55671239/fe47fc0b-0065-4292-b969-60802f22161f

scannillo commented 8 months ago

Hi @rlomeli158 - is this issue happening only on a simulator and not on real devices?

rlomeli158 commented 8 months ago

That video was from a real device, so it happens on both!