Skip to content

Android: Press events not firing on component if rendered outside window by transform #27647

@AdamGerthel

Description

@AdamGerthel

This is slightly difficult to explain in words (easier to check Snack further down 👇)

Steps To Reproduce

React Native version: 0.61.4 (latest Expo SDK version)

  1. Create a view with children that have touch events. The view must be bigger than the device's screen.
  2. Add a child component (like a button) that is placed outside to the edge of the screen than the device's size.
  3. Touch events will not work on the child component

Describe what you expected to happen:
Touch events should fire

Snack, code example, screenshot, or link to a repository:
https://snack.expo.io/@insats/android-touch-event-bug

Try panning to the right, where number 8 is, and press it. Nothing will happen. It's identlical to the other numbers, except that it is rendered outside of the devices' viewport.

The problem is not due to panResonder (I've made another snack using buttons to move around). It seems to be due to transform x/y.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugPlatform: AndroidAndroid applications.StaleThere has been a lack of activity on this issue and it may be closed soon.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions