From fbfe9a779d0c53ac3d164550850a356b6eb5449b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Bert?= <63123542+m-bert@users.noreply.github.com> Date: Fri, 20 Sep 2024 10:16:10 +0200 Subject: [PATCH] [Web] Remove hovering pointer from tracker. (#3115) ## Description I've noticed that in `Hover` inside `onPointerMoveOut` method we add pointer to tracker instead of removing it. While it doesn't make much difference, since tracker is reset in [this line](https://github.com/software-mansion/react-native-gesture-handler/blob/b79223de5a47773a464543018b7231113c1ade68/src/web/tools/GestureHandlerOrchestrator.ts#L28), I think it will be better to change it into removing pointer. ## Test plan Tested on `hover` example. --- src/web/handlers/HoverGestureHandler.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/web/handlers/HoverGestureHandler.ts b/src/web/handlers/HoverGestureHandler.ts index 51a5fc7ca9..832c8e412d 100644 --- a/src/web/handlers/HoverGestureHandler.ts +++ b/src/web/handlers/HoverGestureHandler.ts @@ -35,7 +35,7 @@ export default class HoverGestureHandler extends GestureHandler { } protected onPointerMoveOut(event: AdaptedEvent): void { - this.tracker.addToTracker(event); + this.tracker.removeFromTracker(event.pointerId); this.stylusData = event.stylusData; super.onPointerMoveOut(event);