[Webkit-unassigned] [Bug 205942] New: The visibilitychange event does not fire on iOS when entering the tab switcher
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Jan 8 11:34:47 PST 2020
https://bugs.webkit.org/show_bug.cgi?id=205942
Bug ID: 205942
Summary: The visibilitychange event does not fire on iOS when
entering the tab switcher
Product: WebKit
Version: Safari 13
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: DOM
Assignee: webkit-unassigned at lists.webkit.org
Reporter: philip at philipwalton.com
** Current behavior: **
When opening the tab switcher in Safari on iOS, the `visibilitychange` event will only fire once a user switches to a new tab. If the user instead closes the tab, then no `visibilitychange` event is fired (neither is `pagehide`, `beforeunload`, or `unload` FWIW, though I don't think those events should offer the same guarantees as `visibilitychange`).
STR:
1. Visit https://visibilitychange-logger.glitch.me on an iPhone
2. Click the tab switcher button in the bottom right
3. Close the tab
4. Re-visit https://visibilitychange-logger.glitch.me and notice that no events were logged
(note: `visibilitychange` events *are* logged if you actually switch to another tab)
** Proposed behavior: **
In my opinion, the `visibilitychange` event should fire as soon as the tab switcher button is pressed. That would guarantee that at least the hidden state is triggered regardless of whether the user switches tabs or closes the tab. (This is also consistent with how the `visibilitychange` event fires on Chrome on both Android and iOS)
Alternatively, if https://bugs.webkit.org/show_bug.cgi?id=151234 can be fixed to ensure the `visibilitychange` event fires any time the page goes away (including closing it from the tab switcher), that would also solve this problem.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20200108/75b6b732/attachment.htm>
More information about the webkit-unassigned
mailing list