Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -427,8 +427,14 @@ const validAttributesForEventProps = {
// Pointer events
onClick: true,
onClickCapture: true,
onPointerCancel: true,
onPointerCancelCapture: true,
onPointerDown: true,
onPointerDownCapture: true,
onPointerEnter: true,
onPointerEnterCapture: true,
onPointerUp: true,
onPointerUpCapture: true,
onPointerLeave: true,
onPointerLeaveCapture: true,
onPointerMove: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -411,16 +411,26 @@ const validAttributesForEventProps = ConditionallyIgnoredEventHandlers({
// Pointer events
onClick: true,
onClickCapture: true,
onPointerUp: true,
onPointerDown: true,
onPointerCancel: true,
onPointerCancelCapture: true,
onPointerDown: true,
onPointerDownCapture: true,
onPointerEnter: true,
onPointerMove: true,
onPointerEnterCapture: true,
onPointerUp: true,
onPointerUpCapture: true,
onPointerLeave: true,
onPointerOver: true,
onPointerLeaveCapture: true,
onPointerMove: true,
onPointerMoveCapture: true,
onPointerOut: true,
onPointerOutCapture: true,
onPointerOver: true,
onPointerOverCapture: true,
onGotPointerCapture: true,
onGotPointerCaptureCapture: true,
onLostPointerCapture: true,
onLostPointerCaptureCapture: true,
});

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -779,6 +779,18 @@ protected void onAfterUpdateTransaction(@NonNull T view) {
MapBuilder.of(
"phasedRegistrationNames",
MapBuilder.of("bubbled", "onPointerOver", "captured", "onPointerOverCapture")))
.put(
"topGotPointerCapture",
MapBuilder.of(
"phasedRegistrationNames",
MapBuilder.of(
"bubbled", "onGotPointerCapture", "captured", "onGotPointerCaptureCapture")))
.put(
"topLostPointerCapture",
MapBuilder.of(
"phasedRegistrationNames",
MapBuilder.of(
"bubbled", "onLostPointerCapture", "captured", "onLostPointerCaptureCapture")))
.put(
"topClick",
MapBuilder.of(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,9 @@ void BaseViewProps::setProp(
VIEW_EVENT_CASE(PointerUp);
VIEW_EVENT_CASE(PointerUpCapture);
VIEW_EVENT_CASE(GotPointerCapture);
VIEW_EVENT_CASE(GotPointerCaptureCapture);
VIEW_EVENT_CASE(LostPointerCapture);
VIEW_EVENT_CASE(LostPointerCaptureCapture);
VIEW_EVENT_CASE(MoveShouldSetResponder);
VIEW_EVENT_CASE(MoveShouldSetResponderCapture);
VIEW_EVENT_CASE(StartShouldSetResponder);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ struct ViewEvents {
PointerDownCapture = 35,
PointerUp = 36,
PointerUpCapture = 37,
GotPointerCaptureCapture = 38,
LostPointerCaptureCapture = 39,
};

constexpr bool operator[](const Offset offset) const
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,30 @@ static inline ViewEvents convertRawProp(
"onPointerUpCapture",
sourceValue[Offset::PointerUpCapture],
defaultValue[Offset::PointerUpCapture]);
// TODO: gotPointerCapture & lostPointerCapture
result[Offset::GotPointerCapture] = convertRawProp(
context,
rawProps,
"onGotPointerCapture",
sourceValue[Offset::GotPointerCapture],
defaultValue[Offset::GotPointerCapture]);
result[Offset::GotPointerCaptureCapture] = convertRawProp(
context,
rawProps,
"onGotPointerCaptureCapture",
sourceValue[Offset::GotPointerCaptureCapture],
defaultValue[Offset::GotPointerCaptureCapture]);
result[Offset::LostPointerCapture] = convertRawProp(
context,
rawProps,
"onLostPointerCapture",
sourceValue[Offset::LostPointerCapture],
defaultValue[Offset::LostPointerCapture]);
result[Offset::LostPointerCaptureCapture] = convertRawProp(
context,
rawProps,
"onLostPointerCaptureCapture",
sourceValue[Offset::LostPointerCaptureCapture],
defaultValue[Offset::LostPointerCaptureCapture]);

// PanResponder callbacks
result[Offset::MoveShouldSetResponder] = convertRawProp(
Expand Down
2 changes: 2 additions & 0 deletions scripts/cxx-api/api-snapshots/ReactAndroidDebugCxx.api
Original file line number Diff line number Diff line change
Expand Up @@ -8060,7 +8060,9 @@ enum facebook::react::ViewEvents::Offset : std::size_t {
Click,
ClickCapture,
GotPointerCapture,
GotPointerCaptureCapture,
LostPointerCapture,
LostPointerCaptureCapture,
MoveShouldSetResponder,
MoveShouldSetResponderCapture,
PointerDown,
Expand Down
2 changes: 2 additions & 0 deletions scripts/cxx-api/api-snapshots/ReactAndroidNewarchCxx.api
Original file line number Diff line number Diff line change
Expand Up @@ -7824,7 +7824,9 @@ enum facebook::react::ViewEvents::Offset : std::size_t {
Click,
ClickCapture,
GotPointerCapture,
GotPointerCaptureCapture,
LostPointerCapture,
LostPointerCaptureCapture,
MoveShouldSetResponder,
MoveShouldSetResponderCapture,
PointerDown,
Expand Down
2 changes: 2 additions & 0 deletions scripts/cxx-api/api-snapshots/ReactAndroidReleaseCxx.api
Original file line number Diff line number Diff line change
Expand Up @@ -8051,7 +8051,9 @@ enum facebook::react::ViewEvents::Offset : std::size_t {
Click,
ClickCapture,
GotPointerCapture,
GotPointerCaptureCapture,
LostPointerCapture,
LostPointerCaptureCapture,
MoveShouldSetResponder,
MoveShouldSetResponderCapture,
PointerDown,
Expand Down
2 changes: 2 additions & 0 deletions scripts/cxx-api/api-snapshots/ReactAppleDebugCxx.api
Original file line number Diff line number Diff line change
Expand Up @@ -10083,7 +10083,9 @@ enum facebook::react::ViewEvents::Offset : std::size_t {
Click,
ClickCapture,
GotPointerCapture,
GotPointerCaptureCapture,
LostPointerCapture,
LostPointerCaptureCapture,
MoveShouldSetResponder,
MoveShouldSetResponderCapture,
PointerDown,
Expand Down
2 changes: 2 additions & 0 deletions scripts/cxx-api/api-snapshots/ReactAppleNewarchCxx.api
Original file line number Diff line number Diff line change
Expand Up @@ -9899,7 +9899,9 @@ enum facebook::react::ViewEvents::Offset : std::size_t {
Click,
ClickCapture,
GotPointerCapture,
GotPointerCaptureCapture,
LostPointerCapture,
LostPointerCaptureCapture,
MoveShouldSetResponder,
MoveShouldSetResponderCapture,
PointerDown,
Expand Down
2 changes: 2 additions & 0 deletions scripts/cxx-api/api-snapshots/ReactAppleReleaseCxx.api
Original file line number Diff line number Diff line change
Expand Up @@ -10074,7 +10074,9 @@ enum facebook::react::ViewEvents::Offset : std::size_t {
Click,
ClickCapture,
GotPointerCapture,
GotPointerCaptureCapture,
LostPointerCapture,
LostPointerCaptureCapture,
MoveShouldSetResponder,
MoveShouldSetResponderCapture,
PointerDown,
Expand Down
2 changes: 2 additions & 0 deletions scripts/cxx-api/api-snapshots/ReactCommonDebugCxx.api
Original file line number Diff line number Diff line change
Expand Up @@ -6192,7 +6192,9 @@ enum facebook::react::ViewEvents::Offset : std::size_t {
Click,
ClickCapture,
GotPointerCapture,
GotPointerCaptureCapture,
LostPointerCapture,
LostPointerCaptureCapture,
MoveShouldSetResponder,
MoveShouldSetResponderCapture,
PointerDown,
Expand Down
2 changes: 2 additions & 0 deletions scripts/cxx-api/api-snapshots/ReactCommonNewarchCxx.api
Original file line number Diff line number Diff line change
Expand Up @@ -6020,7 +6020,9 @@ enum facebook::react::ViewEvents::Offset : std::size_t {
Click,
ClickCapture,
GotPointerCapture,
GotPointerCaptureCapture,
LostPointerCapture,
LostPointerCaptureCapture,
MoveShouldSetResponder,
MoveShouldSetResponderCapture,
PointerDown,
Expand Down
2 changes: 2 additions & 0 deletions scripts/cxx-api/api-snapshots/ReactCommonReleaseCxx.api
Original file line number Diff line number Diff line change
Expand Up @@ -6183,7 +6183,9 @@ enum facebook::react::ViewEvents::Offset : std::size_t {
Click,
ClickCapture,
GotPointerCapture,
GotPointerCaptureCapture,
LostPointerCapture,
LostPointerCaptureCapture,
MoveShouldSetResponder,
MoveShouldSetResponderCapture,
PointerDown,
Expand Down
Loading