Ionic-framework: onDoubleClick is not working (Ionic React)

Created on 18 May 2020  路  3Comments  路  Source: ionic-team/ionic-framework

Bug Report

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:

  • Add the event to these components from an Ionic React project

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
react bug

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 addEventListener seems to work.

All 3 comments

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

SebastianGiro picture SebastianGiro  路  3Comments

alexbainbridge picture alexbainbridge  路  3Comments

danbucholtz picture danbucholtz  路  3Comments

GeorgeAnanthSoosai picture GeorgeAnanthSoosai  路  3Comments

masimplo picture masimplo  路  3Comments