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

Fix(Dropdown, TetherContent): add touchstart event to TetherContent, … #456

Closed
wants to merge 3 commits into from

Conversation

Arsolio
Copy link

@Arsolio Arsolio commented Jun 7, 2017

Just added touchstart event to fix issue with toggle for iOS devices.

Closes #458

@eddywashere
Copy link
Member

Is it ever possible to trigger both events or is it always one or the other? I've seen reference to using cursor: pointer as a hack around this issue. That could be a work around for others until I have time to test this.

@haobo-chen
Copy link

@eddywashere Hi! I also looked into this issue for sometime and here are some notes you might find useful:

  • iOS browser(Safari, WKWebView) will only trigger the touchstart event.
  • Desktop browsers will only trigger the click event.
  • For Android browsers will trigger click if touchstart is not listened. If both are listened, only the touchstart will be triggered so there is no double triggering issue.

I haven't tested old Android versions but the statement above is true on 6.x and 7.x.

In conclusion, I think this PR is legit and I will be happy to see it get merged. (Currently I'm using the cursor: pointer hack)

Copy link
Member

@TheSharpieOne TheSharpieOne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes look good to me. I cannot comment on whether or not the address the issue as I don't have an iOS device.

virgofx pushed a commit to virgofx/reactstrap that referenced this pull request Sep 29, 2017
fixes dropdowns, tooltips, and popovers not triggers on touch events

Closes reactstrap#456 reactstrap#458
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Popovers, tooltips, Dropdown doesn't close on iOS devices.
4 participants