question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

onDoubleClick is not working (Ionic React)

See original GitHub issue

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

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:2
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

5reactions
avalanche1commented, Jun 12, 2021

It’s been a year guys. Can we get this fixed?

2reactions
liamdebeasicommented, May 18, 2020

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

onDoubleClick is not working (Ionic React) #21320 - GitHub
As a temporary workaround, adding the double click listener to the element via addEventListener seems to work. 1
Read more >
Ionic V4 React Double Click Issue (forked) - StackBlitz
Starter project for React apps that exports to the create-react-app CLI.
Read more >
why onClick not working with IonMenu ReactJS + Ionic 5?
I am having a bug with IonMenu (Ionic React v5.0.7 + Capacitor 2.2.0)... even when I put "onClick" handlers it aren´t working (not...
Read more >
IonTab onClick handler not working - Ionic React - Elvis Duru
A solution to fix an issue where IonTab onClick handler isn't working as expected.
Read more >
React Navigation - Ionic Framework
React Router requires full paths, and relative paths are not supported. ... in an Ionic React app and allows page transitions and stack...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found