Skip to content

Commit

Permalink
- Ensure move tracking is applied to pressed moves
Browse files Browse the repository at this point in the history
Summary: Changelog: [Internal] - Ensure pointer move tracking is applied to movement while the pointer is pressed

Reviewed By: javache

Differential Revision: D42977052

fbshipit-source-id: 2d48c35a908449d0b2338c33273fb75a430bc393
  • Loading branch information
vincentriemer authored and facebook-github-bot committed Feb 13, 2023
1 parent f7e35d4 commit bf3656b
Showing 1 changed file with 1 addition and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,6 @@ public void handleMotionEvent(
break;
case MotionEvent.ACTION_HOVER_MOVE:
// TODO(luwe) - converge this with ACTION_MOVE

// If we don't move enough, ignore this event.
float[] eventCoordinates = eventState.getEventCoordinatesByPointerId().get(activePointerId);
float[] lastEventCoordinates =
Expand All @@ -275,18 +274,7 @@ public void handleMotionEvent(
onMove(activeTargetTag, eventState, motionEvent, eventDispatcher);
break;
case MotionEvent.ACTION_MOVE:
// TODO(luwe) - converge this with ACTION_HOVER_MOVE
boolean listeningForMove =
isAnyoneListeningForBubblingEvent(activeHitPath, EVENT.MOVE, EVENT.MOVE_CAPTURE);
if (listeningForMove) {
eventDispatcher.dispatchEvent(
PointerEvent.obtain(
PointerEventHelper.POINTER_MOVE,
activeTargetTag,
eventState,
motionEvent,
getCoalescingKey()));
}
onMove(activeTargetTag, eventState, motionEvent, eventDispatcher);
break;
case MotionEvent.ACTION_UP:
case MotionEvent.ACTION_POINTER_UP:
Expand Down

0 comments on commit bf3656b

Please sign in to comment.