Skip to content

RC Paywall - touch event on close button gets propagated through #1226

@asnaseer

Description

@asnaseer

Describe the bug
A clear and concise description of what the bug is. The more detail you can provide the faster our team will be able to triage and resolve the issue. Do not remove any of the steps from the template below. If a step is not applicable to your issue, please leave that step empty.

  1. Environment
    1. Platform: React Native - Android
    2. SDK version: 8.9.1
    3. OS version: 14
    4. Xcode/Android Studio version:
    5. React Native version: 0.74.5
    6. SDK installation (CocoaPods + version or manual): We use Expo 51
    7. How widespread is the issue. Percentage of devices affected. All
  2. Debug logs that reproduce the issue
  3. Steps to reproduce, with a description of expected vs. actual behavior
    We have a screen that has button that the user can touch in order to subscribe to our app. When they touch this button we navigate to a screen that displays the paywall component as follows:
    <View style={styles.container}>
      <RevenueCatUI.Paywall
        onPurchaseCompleted={onPurchaseCompleted}
        onPurchaseStarted={onPurchaseStarted}
        onDismiss={onDismiss}
        options={{ offering: selectedOffering }}
      />
    </View>

When the user touches the close button on the RC Paywall, it invokes the onDismiss handler which then calls navigation.goBack() to take the user back to the screen they came from. However, the close button happens to be positioned just above another button in our app and this button then gets invoked. So it looks like the touch event on the RC Paywall is not being fully consumed by the RevenueCatUI.Paywall component.
4. Other information (e.g. stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, etc.)Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions