Closed dgca closed 2 weeks ago
You have to be using the new RN architecture with the PointerEvent feature turned on in the feature flags
You have to be using the new RN architecture with the PointerEvent feature turned on in the feature flags
Ah, such is the price we pay for living on the bleeding edge. Kk, ty. Closing 🫡
Describe the issue
Pressable elements such
html.button
element are currently unable to receive pointer events other thanonClick
.After looking into it, it seems that
html.button
and elements whose props include anonPress
render a React Native<Pressable />
element. Unfortunately, Pressable does not accept many of the props thatuseNativeProps
normalizes down to.This also affects pseudo selector styles such as
:active
, since the event handlers thatusePseudoStates
tries to use are also invalid.It looks like a potential fix is to use Pressable's
onPressIn
,onPressOut
,onHoverIn
, andonHoverOut
and normalize these toonPointerDown
,onPointerUp
,onPointerEnter
, andonPointerLeave
, respectively.Happy to give it a shot and open a PR if y'all would like, let me know.
Expected behavior
Given the following:
After pressing the button, I would expect "down" and "click" to be logged.
Actual behavior: Only "click" is logged.
Steps to reproduce
v0.0.28
(current as of right now)onPointerDown
prop to a button in the example appTest case
No response
Additional comments
No response