Recognise windows-controls-overlay display mode in isStandalone() check#160696
Recognise windows-controls-overlay display mode in isStandalone() check#160696rzhao271 merged 2 commits intomicrosoft:mainfrom
Conversation
deepak1556
left a comment
There was a problem hiding this comment.
This is a side effect of https://bugs.chromium.org/p/chromium/issues/detail?id=1333978 right ? At first, I was under the impression that the value is only queried if app sets the display_override property which VSCode currently does not. But looking at https://chromium-review.googlesource.com/c/chromium/src/+/3849975, looks like the value follows the presence of WCO ?
I don't think that vscode.dev does run with window controls overlay yet (from a quick check). But it is possible to run open source code with window controls overlay enabled as a PWA. Also if vscode web ever does support window controls overlay in the future, I think it would be good to have this fixed pre-emptively? (I'm not sure if/how this effects vscode running with electron, although this issue will be delayed reaching electron versions.) |
deepak1556
left a comment
There was a problem hiding this comment.
LGTM
I'm not sure if/how this effects vscode running with electron, although this issue will be delayed reaching electron versions.
This change will not affect the desktop version, the code path in question is not exercised there.
This fixes #160695
Recently Chrome has started reporting the display-mode of a PWA as
window-controls-overlayinstead ofstandaloneif window controls overlay is specified in this manifest file.This causes issues with the open in new window logic (and anything that relies on
isStandalone().I think we can fix this with a slight adjustment to the matchMedia query.