react-native-photo-view
react-native-photo-view copied to clipboard
Bug report: Double tap on image in ios triggers onTap event.
Describe the bug
I do the action to close the view in the click event and it works fine in android but on ios when I try to double tap to enlarge the image the onTap event always fires causing my view to close.
Expected behavior
Double-clicking will not trigger the onTap event,like android.
Example code
<PhotoView
source={{uri:"https://github.blog/wp-content/uploads/2022/04/InFocus-featured-image.png"}}
androidScaleType="fitCenter"
style={{width: 300, height: 300}}
onViewTap={(event) => {
if (Platform.OS === 'ios') { // Double-click on ios will trigger onViewTap events, but not on Android
console.log('onViewTap', 'ios')
} else {
this.props.navigation.goBack()
}
}}
onTap={(event) => {
if (Platform.OS === 'ios') { // Double-click on ios will trigger onTap events, but not on Android
console.log('onTap', 'ios')
} else {
this.props.navigation.goBack()
}
}}
onScale={() => {
console.log('onScale')
}}
/>
package.json
"react": "17.0.2",
"react-native": "^0.66.4",
"react-native-photo-view": "^1.5.2"
I'm having the same issue. Is there any news about this? Thanks.
I'm having the same issue. Is there any news about this? Thanks.
I didn't resolve it.