You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dropping handlers when components are dropped (#3619)
## Description
Fixes#3608. On web, when gesture was active and its component had been
dropped, the gesture was not dropped. This caused conflicts with other
handlers, and prevented registering other gestures.
I added a method to drop handlers in the `GestureOchestrator` and call
it when component is dropped.
-->
## Test plan
```ts
import React from 'react';
import { useState } from 'react';
import { Pressable, TextInput } from 'react-native-gesture-handler';
export default function EmptyExample() {
const [shown, setShown] = useState(true)
if (!shown) {
return (
<Pressable
key="1"
testID="other-pressable"
style={{ width: 30, height: 30, backgroundColor: 'red' }}
onPress={() => console.log('pressed')}
/>
)
}
return (
<Pressable key="2" testID="bad-pressable" onPress={() => { }}>
<TextInput
style={{ backgroundColor: 'green', width: 100, height: 30 }}
onSubmitEditing={() => setShown(false)}
/>
</Pressable>
)
};
```
0 commit comments