question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Events do not occur when linking images to iOS.

See original GitHub issue

When marking up img tag with anchor link, hyperlink event is canceled only on iOS, is this in the specifications?

// Example
<Slider>
  <div><a href=""><img src=""></a></div>
  <div><a href=""><img src=""></a></div>
</Slider>

The following if statement is seemed to be the cause of the problem.

https://github.com/akiran/react-slick/blob/90bc26c52ca8cb879f26214b9a9a9cd6621b10d7/src/utils/innerSliderUtils.js#L307

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.

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:1
  • Comments:8

github_iconTop GitHub Comments

31reactions
marzelincommented, Apr 15, 2018

Have you tried setting pointer-events: none on the images? It might help.

9reactions
chrisslatercommented, Jun 28, 2018

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

<div className="container">
  <img />
  <div className="hitbox" onClick={...} />
</div>

.container {
  position: relative;
}

.hitbox {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  left: 0;
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

photos not in events - Apple Support Communities
I am uploading images from my iphone manually (not using Cloud) and the images aren't showing up in events. I know they are...
Read more >
Bug Report - TimeTree Help
iOS : The app slows down if calendars have many recurring events (2022.12.21); iOS 10.1.3 The app is slow and events are not...
Read more >
HTML image links not working on iOS - Stack Overflow
It seems that these image links confuses iOS browsers. When you tap the image link once, it changes to the hover image. When...
Read more >
Creating a recurring series event - Zoom Support
(Optional) Under Event Link, copy the event link to share your event. ... Recording of the event does not automatically start; you will...
Read more >
Events pages - Squarespace Help Center
Events pages don't support booking. ... Instead, it displays a link to the event on your site with a featured image and description....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found