Skip to content

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

Closed
Arsolio wants to merge 3 commits intoreactstrap:masterfrom
Arsolio:add_tether_content_event
Closed

Fix(Dropdown, TetherContent): add touchstart event to TetherContent, …#456
Arsolio wants to merge 3 commits intoreactstrap:masterfrom
Arsolio:add_tether_content_event

Conversation

@Arsolio
Copy link
Copy Markdown

@Arsolio Arsolio commented Jun 7, 2017

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

Closes #458

@eddywashere
Copy link
Copy Markdown
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
Copy Markdown

@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
Copy Markdown
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