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

271
Vistas
scrollTo and scroll-behaviour: smooth canceling eachother

I have a link to an element within the page on my navbar. I'm trying to get the link to center itself in the navbar using js's element.scrollTo() with smooth behavior.

I'm using css's scroll-behavior: smoth; to animate the scroll to a specific element when my user clicks the anchor.

Using element.scrollTo() interferes with the link click itself as, the link only works if there is no scrolling happening in the navbar. Is there a solution that doesn't involve animating one of the scrolls myself?

about 4 years ago · Santiago Gelvez
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