Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

162
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda