Bug 151610 - pagehide doesn't fire when tab is closed
Summary: pagehide doesn't fire when tab is closed
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Page Loading (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
Keywords: InRadar
Depends on:
Reported: 2015-11-25 13:07 PST by Ilya Grigorik
Modified: 2019-12-16 10:56 PST (History)
6 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Ilya Grigorik 2015-11-25 13:07:30 PST
pagehide event appears to fire when tab is navigated to a different URL, but does not fire when the tab is closed (regardless of whether the tab was in foreground or background state). I believe the pagehide event should fire in all cases and Safari appears to be the only browser with this behavior.

Test page: http://output.jsbin.com/zubiyid/latest/quiet
Comment 1 Brady Eidson 2015-11-26 09:21:01 PST
I believe this is a known *Safari* bug, and is not a bug in WebKit.

Can you please try in Minibrowser using WK2 mode?
Comment 2 Ilya Grigorik 2015-11-30 10:34:30 PST
Do I need to build it on this end? Can't seem to find any easily accessible binaries for OSX.
Comment 3 Brady Eidson 2015-11-30 11:03:34 PST
Hmmmmm totally wrong about this being a Safari bug - It's just closely related to one.

We have this in Radar already: rdar://problem/16477268
Comment 4 Philip Walton 2019-12-13 17:14:35 PST
This bug appears to be fixed now. Can anyone confirm? Does anyone know what version it was fixed in?
Comment 5 Philip Walton 2019-12-13 17:24:06 PST
For anyone else interested, based on the two versions of Safari I'm able to test here:
- Version 12.1 (13607. Broken
- Version 13.0.4 (14608. Fixed