[Webkit-unassigned] [Bug 202399] New: Page Visibility API visibilitychange notification incorrectly called with incorrect state with standalone safari apps

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Oct 1 04:29:48 PDT 2019


https://bugs.webkit.org/show_bug.cgi?id=202399

            Bug ID: 202399
           Summary: Page Visibility API visibilitychange notification
                    incorrectly called with incorrect state with
                    standalone safari apps
           Product: WebKit
           Version: Safari 12
          Hardware: iPhone / iPad
                OS: iOS 13
            Status: NEW
          Severity: Blocker
          Priority: P2
         Component: WebCore Misc.
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: djonesuk at me.com

BACKGROUND:
The visibilitychange javascript notification allows a web developer to know if the user has stopped viewing a site and then returned to it. It allows script to run when the user returns to the site.

BUG:
On iOS 13, If you save multiple sites to your home screen, opening one will fire the visibilitychange notification as visible on all others that are still in the App Switcher (Previously opened) even though they are in the Hidden state.
This results in any previously opened web app to fire it's visibilitychange code thinking it is Visible even though the visibility of that page has not actually changed at all and it is Hidden.

HOW TO REPRODUCE:
I have created 2 web pages to demo this:

http://venderbase.com/vischange.html
A simple website that subscribes to the visibilitychange notification and updates the display to show that visibility had changed with the state and time.

http://venderbase.com/nojs.html
Doesn't do anything. It has no Javascript code whatsoever.

Navigate to the above 2 websites and add them to the Home Screen from the Share menu.
>From the home screen, open the vischange website.
>From the home screen, open the nojs website.
Go back to home screen and reopen nojs.
Go back to home screen and reopen nojs.
Repeat opening and closing nojs a few times.
Open vischange again and you will see that it's visibilitychange notification had been fired for every time you opened nojs even though visibility hadn't changed for vischange.

This sounds very similar to an iOS 11 bug that was reported and then fixed in iOS 12 Bug 180523

I've reported this to Apple Feedback Assistant but not had any recognition of it yet. It's a complete app breaker for me since iOS 13.

-- 
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/20191001/70acada3/attachment.html>


More information about the webkit-unassigned mailing list