xamarin/Xamarin.Forms

[ios] listview cell with image and tapgesturerecognizer erroneously call itemselected instead of recognizer

Aperta

#5196 aperta il 11 feb 2019

 (2 commenti) (0 reazioni) (0 assegnatari)C# (1926 fork)batch import
a/gestures 🖖a/listviewe/6 :clock6:help wantedinactivep/iOS 🍎t/bug :bug:up-for-grabs

Metriche repository

Star
 (5644 stelle)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

Description

this code <Image Source="feedicon.png" Grid.Column="1" Grid.Row="0" Grid.RowSpan="4" HorizontalOptions="End" VerticalOptions="Center" HeightRequest="40" Aspect="AspectFill" BackgroundColor="Green"> <Image.GestureRecognizers> <TapGestureRecognizer Tapped="btCell_Clicked" NumberOfTapsRequired="1" /> </Image.GestureRecognizers> </Image>

works nice in android version. if i tap image, btCell_Clicked method executes, outside image - itemselected code.

but on IOS, more often called itemselected, and sometimes, rarely -btCellClicked. i tried to enlarge the image to height 100, put a frame on it . nothing helps

Steps to Reproduce

Expected Behavior

if user taps image - gesture recognizer handles the event, if user taps outside image - listview handles the event

Actual Behavior

Basic Information

visual studio 15.9.5 xamarin.forms 3.5.0.129452 ios min OS version 9, on device 11.2.1 ipad mggx2ru/a

Guida contributor