Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

92
Views
Setting pointer-events dynamically on iOS 15 Safari is unreliable and unpredictable

In Safari on iOS 15, links that are in a container that has pointer-events: none; applied, don't become tappable when pointer-events is set to all dynamically at a later stage. Actually, in some cases they do, but it's very unpredictable. For instance, when the container is an ul and the links are inside a li element, they do become tappable. Or when the link has a button sibling. I know this sounds strange, but it's true. I made a demo, so you can try it for yourself: https://stackblitz.com/edit/web-platform-mdhjqs?file=index.html

Am I missing something? Is this a bug unique to Safari on iOS 15?

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

I stumbled on the same issue with Safari iOS 15, this doesn't happen on mobile Chrome or on desktop Safari.

The solution I found to obtain the same behaviour is to set the inline style with JS, like the following:

if (el.classList.contains("is-clickable")) {
    el.style.pointerEvents = "all";
} else {
    el.style.pointerEvents = "none";
}

I've also removed any property specification in CSS. Once the property is set to none anywhere in the CSS using inline styles doesn't work anymore, which is odd as one would expect inline styles to always take precedence over classes.

For me this is also an issue with the structure ul > li > a, both in my test case and on Senne's example.

I've also tried setting pointer events to auto or initial with no success.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!