Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

onClick doesn't work on mobile device #218

Closed
adityatandon007 opened this issue Sep 20, 2018 · 3 comments
Closed

onClick doesn't work on mobile device #218

adityatandon007 opened this issue Sep 20, 2018 · 3 comments

Comments

@adityatandon007
Copy link

adityatandon007 commented Sep 20, 2018

This is in reference to an earlier closed issue #217

Reproduction demo

Steps to reproduce the problem

  1. https://codesandbox.io/s/842xlk8v99

What is the expected behavior?

First of all I am not able to reproduce my original bug in codesandbox. The issue is with the onClick attached to the div. It doesn't fire in mobile devices. I am using react 15.6.0

The onClick event should fire on mobile devices.

What went wrong?

Two things went wrong.

First unable to reproduce the original bug in codesandbox.
The onClick attached inside the div of the <Popper/> doesn't fire on mobile devices.

Any other comments?

Awesome library though docs can be improved a bit with more simplistic examples.

Packages versions

  • Popper.js:
  • react-popper: 1.0.2
  • React- 15.6.0
@adityatandon007
Copy link
Author

@FezVrasta any help would be great.

@FezVrasta
Copy link
Member

Sorry without a working demo I can't help.

@adityatandon007
Copy link
Author

adityatandon007 commented Sep 24, 2018

@FezVrasta I have come to the conclusion of why click on mobile wasn't working in my case. Basically the issue is with chrome only, in other browsers it was working and so I researched a bit and got that chrome made some breaking changes for handling touches and because I was preventing default and handling it myself it wasn't working. Here is quick reference facebook/react#9809 (comment)
and although react has fixed this it in version 16 but since I am still using react 15 i had to do it myself. Sorry for the trouble though and thanks for this wonderful library again. Feel free to close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants