Skip to main content

Bug Tracker

Side navigation

#14559 closed bug (notabug)

Opened November 20, 2013 08:46AM UTC

Closed November 28, 2013 08:23AM UTC

Last modified November 28, 2013 08:24AM UTC

bug

Reported by: lhaxw@126.com Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.9.1
Keywords: Cc:
Blocked by: Blocking:
Description

the function

$( window ).unload(function() {

alert( "Bye now!" );

});

can not work on Chrom

Attachments (0)
Change History (4)

Changed November 22, 2013 03:23PM UTC by axl.jq comment:1

The event isn't intended to do such things, it's only to show a *confirmation message*. Chrome is blocking old behavior to run specific code onunload. As it should always be.

Use it this way:

http://stackoverflow.com/a/3464537/1670956

jQuery guys, you should remove outdated examples at http://api.jquery.com/unload/ since I suppose all browsers will follow the Chrome behavior.

Changed November 28, 2013 08:23AM UTC by m_gol comment:2

resolution: → notabug
status: newclosed

Thanks for the report! As axl.jq said, it's a documentation issue, not the jQuery one. I reported it there: https://github.com/jquery/api.jquery.com/issues/388

Changed November 28, 2013 08:24AM UTC by m_gol comment:3

#14557 is a duplicate of this ticket.

Changed November 28, 2013 08:24AM UTC by m_gol comment:4

#14558 is a duplicate of this ticket.