Closed m-bert closed 2 months ago
As pointed in #3117, fireGestureHandler runs callback function even if gesture has been marked as disabled with enable(false). This PR removes this behavior.
fireGestureHandler
enable(false)
Closes #3117
Description
As pointed in #3117,
fireGestureHandler
runs callback function even if gesture has been marked as disabled withenable(false)
. This PR removes this behavior.Closes #3117
Test plan
Run the following test:
```tsx import React from 'react'; import { View } from 'react-native'; import Animated from 'react-native-reanimated'; import { Gesture, GestureDetector, GestureHandlerRootView, TapGestureHandler, type TapGesture, } from '../'; import { fireGestureHandler, getByGestureTestId } from '../jestUtils'; import { render } from '@testing-library/react-native'; import Mocks from '../mocks'; type ComponentProps = { enabled: boolean; callback: () => void; }; const Component = ({ enabled, callback }: ComponentProps) => { const tap = Gesture.Tap() .withTestId('tap') .enabled(enabled) .runOnJS(true) .onEnd(callback); return (