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

219
Views
Safari doesn't seem to update DOM on beforeunload event... is there a fix?

I'm using the following code to display a "loading" overlay when navigating our web application. This works just fine in Chrome, Firefox und IE / Edge... but not in Safari. The event is triggered and the console log shows the event – but the visual change via jQuery show() has no effect.

$(document).ready(function() {
    $(window).on("beforeunload", function() {
        console.log("in beforeunload...");
        $("#overlay").show();
    });
});

Is this a known limitation in Safari (macOS) or am I missing something? Is there some workaround?

over 4 years ago · Santiago Trujillo
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!