Bug 257806 - macOS Sonoma web apps don't correctly report `matchMedia('(display-mode: standalone)')`
Summary: macOS Sonoma web apps don't correctly report `matchMedia('(display-mode: stan...
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: Safari 16
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
Keywords: InRadar
Depends on:
Reported: 2023-06-07 08:15 PDT by Thomas Steiner
Modified: 2023-07-05 12:01 PDT (History)
8 users (show)

See Also:

Safari vs. Chrome (643.13 KB, image/png)
2023-06-07 08:15 PDT, Thomas Steiner
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Steiner 2023-06-07 08:15:22 PDT
Created attachment 466620 [details]
Safari vs. Chrome

Go to https://sapphire-handy-butternut.glitch.me/. In the tab, it says the app is running in the tab. Add the app to the Dock and it should say it's running as a standalone web app, but it doesn't. Compare the behavior in Chrome (see screenshot).
Comment 1 Radar WebKit Bug Importer 2023-06-07 09:58:16 PDT
Comment 2 Darryl Pogue 2023-06-07 14:23:36 PDT
Possibly related to #257776 (exposing navigator.standalone on macOS)
Comment 3 Thomas Steiner 2023-06-08 03:46:53 PDT
FWIW, `navigator.standalone` is not standardized as far as I can tell: https://developer.mozilla.org/en-US/docs/Web/API/Navigator#navigator.standalone. There's no trace at an attempt to do so in https://github.com/whatwg/html/issues?q=is%3Aissue+%28%22standalone%22+OR+%22navigator.standalone%22%29+ either.
Comment 4 Brady Eidson 2023-06-08 09:44:17 PDT
Thanks for trying out web apps on macOS. We appreciate the testing and feedback.

With my Apple hat on:
The cause of this particular issue in the first macOS Sonoma developer seed isn't in WebKit, but rather in Apple's hosting application.
We look forward to developers continuing to try out the feature in future seeds.

With my WebKit hat on:
The appropriate "webkit.org bug accounting" step here is to close as invalid.
Comment 5 Brent Fulgham 2023-06-08 12:31:35 PDT
I'm adjusting the status to MOVED because this is a real issue, it's just not one that can be fixed in the WebKit Open Source code.

The work is being done under <rdar://problem/110403186> in the appropriate part of the system.
Comment 6 Thomas Steiner 2023-06-09 04:33:24 PDT
Thanks for working on this at the relevant level then. Glad you agree it's something that needs fixing. Please also see https://github.com/w3c/manifest/issues/1092#issuecomment-1584312331 for some relevant side notes.
Comment 7 Brent Fulgham 2023-06-09 09:08:05 PDT
We will update this bugzilla as soon as a beta is available with the correct behavior.
Comment 8 Luming Yin 2023-07-05 12:01:31 PDT
Thank you for your bug report! This issue has been resolved in macOS Sonoma Beta 3 (23A5286g).