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

Click Events on Child Items Not Firing - iOS (Desktop Browsers working as intended) #38

Closed
merlinf14b opened this issue Apr 7, 2015 · 15 comments
Labels

Comments

@merlinf14b
Copy link

Slider portion works great, but any buttons that are within the panes are having their click events trapped. I attempted to turn off the swipe detection, but that also didn't allow clicks to go through. Any thoughts?

var Slick = require('react/react-slick');
React.createElement(Slick, {},
     React.DOM.button({onClick: function() {console.log('does this work??');}}, 'one'),
     React.DOM.button({onClick: function() {console.log('does this work??');}}, 'two'),
     React.DOM.button({onClick: function() {console.log('does this work??');}}, 'three'),
     React.DOM.button({onClick: function() {console.log('does this work??');}}, 'four'),
     React.DOM.button({onClick: function() {console.log('does this work??');}}, 'five'),
     React.DOM.button({onClick: function() {console.log('does this work??');}}, 'six')
)
@haohcraft
Copy link

Ran into the same issue

@haohcraft
Copy link

Related to kenwheeler/slick#412

if we upgrade the slick version we are using here, it would fix

@vramana vramana added the bug label May 26, 2015
@yankrasny
Copy link

I've run into the same issue. On desktop, onClick events work as expected, but on mobile (whether in the chrome simulator or on an actual phone) onClick events don't go through. Thinking that this may have been related to facebook/react#1169, I added cursor: pointer on all clickable elements, but that did not solve the problem.

@vramana
Copy link
Contributor

vramana commented Jun 25, 2015

@yankrasny Can you make a gist or jsfiddle? From which I can reporduce this issue? It will help a lot.

@yankrasny
Copy link

@vramana sure, I'll try to get you an example later today. Thanks for the quick response.

@yankrasny
Copy link

Hey @vramana, here are the jsfiddles for desktop and mobile.

Desktop: https://jsfiddle.net/yankrasny/hug2f0r1/6/
Mobile (access from a mobile or a simulator, I used chrome): https://jsfiddle.net/m/rvt/

The behavior is to display the link that was last clicked as proof that the onClick event went through. It works on desktop but not on mobile.

You'll also notice that on desktop, clicking any of the slides brings you back to the first one. I believe @haohcraft is right and this may be related to kenwheeler/slick#412.

@stevemckenzie
Copy link

This is also happening for me.

@stevemckenzie
Copy link

@akiran any update on this?

@akiran
Copy link
Owner

akiran commented Jul 16, 2015

@stevemckenzie Can you test the fix in 0.6.1 version

@yankrasny
Copy link

Just tested version 0.6.1 and the issue appears to be fixed. Thank you!

@stevemckenzie
Copy link

Thank you @akiran ! This definitely fixes the ability to touch links in slides.

I thought this was going to fix the automatically scrolling back to the first item when you start scrolling the page issue too but it didn't.

@akiran
Copy link
Owner

akiran commented Jul 17, 2015

@stevemckenzie Can you open a separate issue for the scrolling issue.

@gus4no
Copy link

gus4no commented Jul 28, 2015

how can I get version 0.6.1 with this fix? Available versions using bower are 0.5.0, 0.4.1 and 0.3.1

@akiran
Copy link
Owner

akiran commented Jul 28, 2015

I created a github release with 0.6.4 version.

Now you should be able to get it from bower

@gus4no
Copy link

gus4no commented Jul 28, 2015

Thank you very much! @akiran

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

No branches or pull requests

7 participants