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

132
Vistas
location.hash not waiting rendering on firefox

I'm using this javascript event.

      myDatepicker.addEventListener('dateChange.mdb.datepicker', (e) => {
        var params = new URLSearchParams(location.search);
        params.set('date', Datepicker1.value.replaceAll('/', "-"));
        window.location.hash = 'graph';
        window.location.search = params.toString();
      });

In chrome everything is working as expected.

In firefox the event doesn't wait for the page to be rendered so it doesn't scroll to the right place. However if I press enter on the url after the event or enter the url manually, it is working as expected.

How can I force firefox to wait until the page rendering is complete?

Max

ps: What I tried following barmar comment with the same result

      redirect = (e) => {
        var params = new URLSearchParams(location.search);
        params.set('date', Datepicker1.value.replaceAll('/', "-"));
        window.location.hash = 'graph';
        window.location.search = params.toString();
      };
      myDatepicker.addEventListener('dateChange.mdb.datepicker', redirect);
      document.addEventListener('load', redirect);

ps2: It seem to be the intended comportment with the reloading of firefox not deleting some elements from the cache that other browser do.

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