stripe-react-native icon indicating copy to clipboard operation
stripe-react-native copied to clipboard

[Android] CardField's icon disappears after navigating to and back from another screen

Open prattvaidya opened this issue 1 year ago • 1 comments
trafficstars

Describe the bug The CC icon in the <CardField> component is not displayed when the user navigates to another screen and then navigates back to the original screen (reproducible on Android only)

The issue was observed after upgrading from @stripe/stripe-react-native v0.31.1 to v0.38.0

To Reproduce Steps to reproduce the behavior:

  1. Go to a screen that renders the <CardField> component (on an Android device)
  2. (Optional) Enter the card details in the <CardField>
  3. Navigate to a different screen that's stacked on top of the existing screen
  4. Navigate back from the stacked screen to the original screen that contains the <CardField> component

Expected behavior The CC icon (default / brand icon depending on whether Step 2 was executed) should be displayed inside the <CardField> component

Recording

https://github.com/stripe/stripe-react-native/assets/6943596/1fce454c-e009-4127-8cb0-76718251a53e

Desktop (please complete the following information):

  • OS: Mac OS
  • Browser: NA
  • Version: Sonoma 14.5

Smartphone (please complete the following information):

  • Device: Pixel 3a emulator
  • OS: Android
  • Browser: NA
  • Version 13 (API 33)

Additional context Code snippet used for the above recording:

<CardField
  postalCodeEnabled={false}
  cardStyle={{ borderWidth: 1 }}
  style={{ height: 50 }}
/>

This issue could be related to or the same as the following issues:

  • #1682
  • #1685

prattvaidya avatar Jul 09 '24 16:07 prattvaidya