-
Notifications
You must be signed in to change notification settings - Fork 273
Setting pointerEvents to "box-none" prevents triggering onTouch* and onLayout events on the element #897
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
Comments
We support gesture responder system, but not |
@thymikee great question. I am not sure. I found facebook/react-native#23686, which attempted to open a discussion on this specifically. It was closed as off-topic. Unfortunately, there does not appear to be a new discussion in the appropriate issue tracker. In regards to |
Is it possible In this light we should extend our pointer events support to these events. |
No, I do not believe so. The failing test case I provided for this issue originates from the WordPress Gutenberg project, which utilized
👍🏻 Great. |
I opened #906 for consideration to resolve this issue. |
Describe the bug
Setting
pointerEvents: 'box-none'
on aView
prohibits triggeringonTouch*
oronLayout
events on theView
. This behavior differs from React Native itself. This Expo Snack showcases that pressing the childPressable
of a<View pointerEvents="box-none" />
still triggers theonTouchStart
andonTouchEnd
events. This change in behavior, which appears to differ from React Native, began in with7.2.0
due to changes in #655.Expected behavior
Invoking
fireEvent.trigger(viewWithPointerEventsBoxNone, "onTouchStart")
results in triggering theView
'sonTouchStart
handler.Similarly, invoking
fireEvent.trigger(viewWithPointerEventsBoxNone, "onLayout")
results in triggering theView
'sonLayout
handler.Steps to Reproduce
pointerevents-box-none-and-ontouchevents
branch.npm install
npm run test
Screenshots
n/a
Versions
The text was updated successfully, but these errors were encountered: