[Webkit-unassigned] [Bug 206213] New: No events are fired when a user enters the App Switcher on iOS
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Jan 13 21:33:39 PST 2020
https://bugs.webkit.org/show_bug.cgi?id=206213
Bug ID: 206213
Summary: No events are fired when a user enters the App
Switcher on iOS
Product: WebKit
Version: Safari 13
Hardware: iPhone / iPad
OS: iOS 13
Status: NEW
Severity: Normal
Priority: P2
Component: DOM
Assignee: webkit-unassigned at lists.webkit.org
Reporter: philip at philipwalton.com
** Problem: **
When a user visits a web page and then enters the App Switcher, no events are fired.
STR:
1. Visit https://event-logger.glitch.me/
2. Swipe up from the bottom of the screen (tested on iPhone X) to enter the App Switcher
3. Return to Safari
4. Notice that no events are logged in the table.
Alternatively:
1. Visit https://event-logger.glitch.me/
2. Swipe up from the bottom of the screen (tested on iPhone X) to enter the App Switcher
3. Close Safari
4. Open Safari (which reloads https://event-logger.glitch.me/)
5. Notice that only the `pageshow` event is logged (from the current page load, not the old page).
The demo page at https://event-logger.glitch.me/ logs all `blur`, `visibilitychange`, `pagehide`, and `pageshow`, events.
If you focus/blur the elements on the page, switch tabs to another page, close the tab, refresh the page, or enter the Safari tab switcher, in all cases you will see events being logged.
On the other hand if you open the App Switcher you won't see any events logged. This means that if a user leaves the page by enter the App Switcher and then closes Safari, there's absolutely no developer-visible signal. There's only a developer visible signal if the user actually switches apps (in that case `blur` and `visibilitychange` are logged).
This is a problem because, without any signal that a user may be about to leave, there's no way for a developers to persist unsaved state (in order to restore it when the user comes back).
** Solution: **
It would be better (and consistent with Android) if both the `blur` and `visibilitychange` events were fired when the user entered the App Switcher, not just when they actually switched apps.
In fact, Safari *does* fire the `blur` event when using Safari's tab switcher, but no event is fired when using the OS's App Switcher. It seems like (at minimum) these two cases should be consistent.
Related issues:
https://bugs.webkit.org/show_bug.cgi?id=205942
https://bugs.webkit.org/show_bug.cgi?id=199854
https://bugs.webkit.org/show_bug.cgi?id=151234
--
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/20200114/fd86c4ce/attachment-0001.htm>
More information about the webkit-unassigned
mailing list