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

135
Views
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
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!