@@ -1059,21 +1059,33 @@ void CompositionEventHandler::onPointerMoved(
1059
1059
1060
1060
facebook::react::PointerEvent pointerEvent = CreatePointerEventFromIncompleteHoverData (ptScaled, ptLocal);
1061
1061
1062
- auto handler = [&targetView,
1063
- &pointerEvent](std::vector<winrt::Microsoft::ReactNative::ComponentView> &eventPathViews) {
1062
+ // check if this pointer corresponds to active touch that has a responder
1063
+ auto activeTouch = m_activeTouches.find (pointerId);
1064
+ bool isActiveTouch = activeTouch != m_activeTouches.end () && activeTouch->second .eventEmitter != nullptr ;
1065
+
1066
+ auto handler = [&targetView, &pointerEvent, isActiveTouch](
1067
+ std::vector<winrt::Microsoft::ReactNative::ComponentView> &eventPathViews) {
1064
1068
const auto eventEmitter = targetView
1065
1069
? winrt::get_self<winrt::Microsoft::ReactNative::implementation::ComponentView>(targetView)
1066
1070
->eventEmitterAtPoint (pointerEvent.offsetPoint )
1067
1071
: nullptr ;
1068
- bool hasMoveEventListeners =
1072
+ bool hasMoveEventListeners = isActiveTouch ||
1069
1073
IsAnyViewInPathListeningToEvent (eventPathViews, facebook::react::ViewEvents::Offset::PointerMove) ||
1070
1074
IsAnyViewInPathListeningToEvent (eventPathViews, facebook::react::ViewEvents::Offset::PointerMoveCapture);
1075
+
1071
1076
if (eventEmitter != nullptr && hasMoveEventListeners) {
1077
+ // Add logging before dispatching the event
1072
1078
eventEmitter->onPointerMove (pointerEvent);
1073
1079
}
1074
1080
};
1075
1081
1076
1082
HandleIncomingPointerEvent (pointerEvent, targetView, pointerPoint, keyModifiers, handler);
1083
+
1084
+ if (isActiveTouch) {
1085
+ // For active touches with responders, also dispatch through touch event system
1086
+ UpdateActiveTouch (activeTouch->second , ptScaled, ptLocal);
1087
+ DispatchTouchEvent (TouchEventType::Move, pointerId, pointerPoint, keyModifiers);
1088
+ }
1077
1089
}
1078
1090
}
1079
1091
@@ -1387,12 +1399,7 @@ void CompositionEventHandler::DispatchTouchEvent(
1387
1399
activeTouch.eventEmitter ->onPointerDown (pointerEvent);
1388
1400
break ;
1389
1401
case TouchEventType::Move: {
1390
- bool hasMoveEventListeners =
1391
- IsAnyViewInPathListeningToEvent (eventPathViews, facebook::react::ViewEvents::Offset::PointerMove) ||
1392
- IsAnyViewInPathListeningToEvent (eventPathViews, facebook::react::ViewEvents::Offset::PointerMoveCapture);
1393
- if (hasMoveEventListeners) {
1394
- activeTouch.eventEmitter ->onPointerMove (pointerEvent);
1395
- }
1402
+ activeTouch.eventEmitter ->onPointerMove (pointerEvent);
1396
1403
break ;
1397
1404
}
1398
1405
case TouchEventType::End:
0 commit comments