nativescript-community / ui-image

Advanced and efficient image display plugin which uses Fresco (Android) and SDWebImage (iOS) to implement caching, placeholders, image effects, and much more.
Apache License 2.0
36 stars 9 forks source link

itemTap of CollectionView not fired if tapping on ZoomImg image #60

Closed rdlauer closed 2 months ago

rdlauer commented 2 months ago

I'm not sure if this is a ui-collectionview issue, or a ui-zoomimage issue! But the itemTap event of a CollectionView does not get fired if the image in the template gets tapped, and it's a ZoomImg (regular NS Image works fine). In this case, itemTap is fired if you tap the label, but not the image:

<cv:CollectionView items="{{ items }}" itemTap="{{ itemTap }}" colWidth="50%" rowHeight="140">
    <cv:CollectionView.itemTemplate>
              <StackLayout>
            <img:ZoomImg src="{{ cover_image }}" />
            <Label text="{{ title }}" />
        </StackLayout>
    </cv:CollectionView.itemTemplate>
</cv:CollectionView>
farfromrefug commented 2 months ago

@rdlauer it is not a bug. It is a behavior. Zoomimg can be zoomed so will catch touch event. And you should use tap event on a template view instead of itemTap

rdlauer commented 2 months ago

Got it, thanks!