-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Events do not occur when linking images to iOS. #1190
Comments
Have you tried setting |
@marzelin unfortunately if you want to assign a click handler directly to the img then this is still an issue |
I ran into this issue. It seems this line: react-slick/src/utils/innerSliderUtils.js Line 307 in 90bc26c
Stops the user from clicking a link that wraps an image. I originally removed the line as By taking that line out you loose the ability to scroll the slider using the mouse pointer. So my next solution which seems to have worked is to detect if it's not a mobile device to run this line
|
Had the same issue. Instead of dealing with react-slick code I replaced my img elements with div elements with a background-image. There's a need to have specific styling in order to make the div emulate the img behavior in terms of sizing.
Thanks everyone by having the time to debug and identify the root cause! |
I have encountered this issue with the images but didn't want to drastically change the markup that @pmgmendes recommends. Instead I created an extra element and added the onclick to that, and then used css to overlay the image
|
I change the code by removing Diff of my code change here: CodeDeFury@fdd3f9e |
Any updates in library? |
I used this to fix the iOS-issue. However, this has the exact opposite effect on Internet Explorer 11, unfortunately. |
When marking up img tag with anchor link, hyperlink event is canceled only on iOS, is this in the specifications?
The following if statement is seemed to be the cause of the problem.
react-slick/src/utils/innerSliderUtils.js
Line 307 in 90bc26c
In the current situation, not only image links but also onClick events can not be used, so we want at least a click event to be allowed.
The text was updated successfully, but these errors were encountered: