Open
Description
Hello
Wouldn't it be good to have the ability to determine more events for web?
Like for Pressable if the Platform.OS === 'web' onPress event returned a value containing the key
Like
const onPressHandler = (e) => {
if(Platform.OS === 'web' && e.key === 'Middle Mouse Button' ) {
// do something...
}
}
<Pressable
onPress={onPressHandler}
/>
my specific use case was to use Pressable
from react-native-gesture-handler
instead of Link
so items wouldn't get dragged by mouse in a carousel in web. but be able to open links in new tab. but there was no Middle Mouse Button handler
I finally used
Platform.OS === 'web' ? (
<a
href={item.url}
className='select-none [user-drag:none]'
draggable='false'
>
) :
Metadata
Metadata
Assignees
Labels
No labels