Bug Tracker

Ticket #10509 (closed bug: cantfix)

Opened 3 years ago

Last modified 20 months ago

JQUERY UNLOAD DOESN'T WORK IN GOOGLE CHROME 14 AND ABOVE!

Reported by: bistra Owned by:
Priority: low Milestone: None
Component: event Version: 1.6.4
Keywords: Cc:
Blocking: Blocked by:

Description

JQUERY UNLOAD DOESN'T WORK IN GOOGLE CHROME 14 AND ABOVE! For example this: $(window).unload(function(){

alert("Goodbye!");

});

doesn't produces anything! It crashes totally my project! Help me, please!

Change History

comment:1 Changed 3 years ago by addyosmani

  • Priority changed from undecided to low
  • Status changed from new to open
  • Component changed from unfiled to event

Confirmed that this works in FF.latest but not in Chrome 14+:  http://jsfiddle.net/BT3SS/1/. Pretty sure this is a dupe of another ticket, but will chase down and confirm. I do know there are known issues with onbeforeunload in Chrome.stable onwards, but need to find out if there are related ones with this.

comment:2 Changed 3 years ago by dmethvin

  • Status changed from open to closed
  • Resolution set to cantfix

Not our bug, and something we can't patch.

 http://code.google.com/p/chromium/issues/detail?id=91854

Several dups in their bug database, search for "onunload" to see them.

Could be related to this security fix since it arose at Chrome 14:

 http://xforce.iss.net/xforce/xfdb/69872

comment:3 Changed 2 years ago by anonymous

It has a solution:

window.onbeforeunload = function() { return "text"; }

It's not a jQuery code, but it works.

comment:4 Changed 20 months ago by anonymous

The solution mentioned above:

window.onbeforeunload = function() { return "text"; }

does not work either for me if I close the respective window. It works if I reload the page.

Note: See TracTickets for help on using tickets.