Ionic version:
[x] 4.x
Current behavior:
I'm testing onDoubleClick with IonItem and IonCard react components but it's not working:
Expected behavior:
Trigger the event as expected
Steps to reproduce:
Related code:
<IonItem onDoubleClick={(e) => alert('not working')}>
</IonItem>
Sample application: https://stackblitz.com/edit/ionic-v4-react-double-click-issue
Ionic info:
Ionic:
Ionic CLI : 6.4.1 (/usr/local/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/react 5.1.1
Capacitor:
Capacitor CLI : 2.0.2
@capacitor/core : 2.0.2
Utility:
cordova-res (update available: 0.14.0) : 0.8.0
native-run (update available: 1.0.0) : 0.2.8
System:
NodeJS : v10.15.3 (/usr/local/bin/node)
npm : 6.14.4
OS : macOS Mojave
Thanks for the issue! This issue has been labeled as needs reproduction. This label is added to issues that need a code reproduction.
Please provide a reproduction with the minimum amount of code required to reproduce the issue. Without a reliable code reproduction, it is unlikely we will be able to resolve the issue, leading to it being closed.
For a guide on how to create a good reproduction, see our Contributing Guide.
@liamdebeasi this is the sample application https://stackblitz.com/edit/ionic-v4-react-double-click-issue
Thanks for your help!
Thanks! I was able to reproduce this issue. I noticed your reproduction used an old version of Ionic React, so here is a reproduction of the issue using the latest version of Ionic: https://stackblitz.com/edit/ionic-v4-react-double-click-issue-jyvd9h
As a temporary workaround, adding the double click listener to the element via addEventListener seems to work.
Most helpful comment
Thanks! I was able to reproduce this issue. I noticed your reproduction used an old version of Ionic React, so here is a reproduction of the issue using the latest version of Ionic: https://stackblitz.com/edit/ionic-v4-react-double-click-issue-jyvd9h
As a temporary workaround, adding the double click listener to the element via
addEventListenerseems to work.