Skip to content

Commit 2f785a0

Browse files
committed
Keep tapAnimationDuration positive on iOS
1 parent d7767e5 commit 2f785a0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/react-native-gesture-handler/apple/RNGestureHandlerButtonComponentView.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ - (void)updateProps:(const Props::Shared &)props oldProps:(const Props::Shared &
242242

243243
_buttonView.userEnabled = newProps.enabled;
244244
_buttonView.pressAndHoldAnimationDuration = newProps.pressAndHoldAnimationDuration;
245-
_buttonView.tapAnimationDuration = newProps.tapAnimationDuration;
245+
_buttonView.tapAnimationDuration = newProps.tapAnimationDuration > 0 ? newProps.tapAnimationDuration : 0;
246246
_buttonView.activeOpacity = newProps.activeOpacity;
247247
_buttonView.defaultOpacity = newProps.defaultOpacity;
248248
_buttonView.activeScale = newProps.activeScale;

0 commit comments

Comments
 (0)