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

160
Views
Problems with focus in web component shadows, only in Safari

I'm finding this strange behavior with :focus in Safari 15.1, under Mac OS Monterey when I focus on a text input that is within a web component's shadow root.

This bug is currently reproducible at https://xiome.io/

Safari 15.1

shadow-root focus issue in safari

Chrome 98, and Firefox

enter image description here

What's going on?

I'm getting a lot more focus outlines than I bargained for. It seems as though Safari is enabling :focus pseudoclass on all elements between the shadow root and the focused text input.

My app's web components need to be able to accept a custom focus outline, so they can match other websites — so the components accept a --focus-outline variable and apply this with a *:focus rule under every shadow root, in theme.css.ts

*:focus {
    outline: var(--focus-outline, 3px solid cyan);
}

What can I do to alleviate this problem in Safari while maintaining my components' acceptance of custom focus outlines?

about 4 years ago · Juan Pablo Isaza
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!