mdn/content

IsStandaloneContent does not work with `display: fullscreen` in Chrome Android

Open

#34,928 创建于 2024年7月19日

在 GitHub 查看
 (2 评论) (0 反应) (0 负责人)Markdown (22,427 fork)batch import
Content:PWAhelp wanted

仓库指标

Star
 (8,900 star)
PR 合并指标
 (平均合并 7天 3小时) (30 天内合并 147 个 PR)

描述

MDN URL

https://developer.mozilla.org/en-US/docs/Web/Progressive_web_apps/How_to/Create_a_standalone_app

What specific section or headline is this issue about?

No response

What information was incorrect, unhelpful, or incomplete?

The isStandaloneApp code provided on that page is false when running in an installed fullscreen PWA app (manifest display: fullscreen) in Chrome on Android.

Weirdly, this is true on Chrome Desktop, and using window.matchMedia("(display-mode: fullscreen)").matches is also false.

I wonder if this is a Chrome bug which I am happy to file if you confirm whether according to the spec, Chrome on Android should match display-mode: fullscreen OR display-mode: standalone in that case (and which one of those).

What did you expect to see?

An isStandaloneApp function that works regardless of what's set in the PWA manifest display.

Do you have any supporting links, references, or citations?

No response

Do you have anything more you want to share?

No response

MDN metadata

贡献者指南