Bug 151610
Summary: | pagehide doesn't fire when tab is closed | ||
---|---|---|---|
Product: | WebKit | Reporter: | Ilya Grigorik <igrigorik> |
Component: | Page Loading | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED CONFIGURATION CHANGED | ||
Severity: | Normal | CC: | achristensen, ap, beidson, cdumez, hello, mike, philip, simon.fraser |
Priority: | P2 | Keywords: | InRadar |
Version: | WebKit Nightly Build | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
See Also: |
https://bugs.webkit.org/show_bug.cgi?id=116769 https://bugs.webkit.org/show_bug.cgi?id=151234 https://bugs.webkit.org/show_bug.cgi?id=194897 |
Ilya Grigorik
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
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Brady Eidson
I believe this is a known *Safari* bug, and is not a bug in WebKit.
Can you please try in Minibrowser using WK2 mode?
Ilya Grigorik
Do I need to build it on this end? Can't seem to find any easily accessible binaries for OSX.
Brady Eidson
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
Philip Walton
This bug appears to be fixed now. Can anyone confirm? Does anyone know what version it was fixed in?
Philip Walton
For anyone else interested, based on the two versions of Safari I'm able to test here:
- Version 12.1 (13607.1.40.1.5): Broken
- Version 13.0.4 (14608.4.9.1.4): Fixed
sideshowbarker
(In reply to Philip Walton from comment #4)
> This bug appears to be fixed now. Can anyone confirm? Does anyone know what
> version it was fixed in?
(In reply to Philip Walton from comment #5)
> For anyone else interested, based on the two versions of Safari I'm able to
> test here:
> - Version 12.1 (13607.1.40.1.5): Broken
> - Version 13.0.4 (14608.4.9.1.4): Fixed
Can you clarify how you’re testing? Do we have a test for this in WPT? I tried http://wpt.live/page-visibility/unload.html in Safari Tech Preview 113 and Safari 14 and I get a TIMEOUT/NOTRUN failure.
Philip Walton
You can test this manually using an event-logger page like this: https://event-logger.glitch.me