From 86bd507ebf5ccb461c24e6231a0aabfa74667b92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Bert?= Date: Mon, 29 Jul 2024 13:51:25 +0200 Subject: [PATCH] Fix calculation --- apple/Handlers/RNLongPressHandler.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apple/Handlers/RNLongPressHandler.m b/apple/Handlers/RNLongPressHandler.m index 7314d615e6..cd6e5dba9c 100644 --- a/apple/Handlers/RNLongPressHandler.m +++ b/apple/Handlers/RNLongPressHandler.m @@ -75,7 +75,7 @@ - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event CGPoint trans = [self translationInView]; if ((_gestureHandler.shouldCancelWhenOutside && ![_gestureHandler containsPointInView]) || (TEST_MAX_IF_NOT_NAN( - fabs(trans.y * trans.y + trans.x + trans.x), self.allowableMovement * self.allowableMovement))) { + fabs(trans.y * trans.y + trans.x * trans.x), self.allowableMovement * self.allowableMovement))) { self.enabled = NO; self.enabled = YES; }