-
Notifications
You must be signed in to change notification settings - Fork 30.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support opening new PWA windows when in fullscreen #156347
Comments
Open for help via PR. Thanks for the analysis. |
@a-stewart as original author of #143287 would you have a look at the suggested solution in #156424 ? |
Yep, that solution looks good to me, in practice it works exactly the same as what is described above. |
This bug has been fixed in the latest release of VS Code Insiders! @a-stewart, you can help us out by commenting If things still don't seem right, please ensure you're on version 73fd3f1 of Insiders (today's or later - you can use Happy Coding! |
Hm, it didn't seem to resolve the issue for me.
I need to call it a night tonight, but I'll investigate a bit more next week. (There are no regressions in this work that I can tell, I expect that isStandalone is returning the correct value from what the code says, so I think there may be a second issue somewhere else.) As an aside, is there a way to get source maps on insiders.vscode.dev - would be good to see if I can put some breakpoints in. If not I can fast forward this patch onto our fork and debug it there. |
Reopening and again, help wanted, so feel free to open a PR to fix this that is meaningfully small. Sourcemaps work on insiders.vscode.dev out of the box, there is nothing specific to do. They just need a bit of loading time. |
There is a second issue. It seems that vscode/src/vs/code/browser/workbench/workbench.ts Lines 381 to 382 in cb79d01
try PWA demo from web.dev with this issue: https://mlearn-pwa-windows-basic.glitch.me/ |
Can we not just immediately on startup run And in the other case where you transition from a tab into a PWA, only there do the dynamic approach? I feel this is a regression from https://github.com/microsoft/vscode/pull/143287/files#diff-43a30e8aea5c247b550412be5530c9fdda1e9b3010f229761507b6be6ef914a7 ? |
User COULD switch PWA to non-PWA: From my testing above, |
Yeah I see, but then again: if we cannot fix it properly for PWA, I would rather have "Open in Chrome" behave with a bug, than loosing the PWA mode when opening a new window. So I would tolerate this issue more over the current one. @a-stewart thoughts? |
@bpasero Let me clarify and forgive me if I am too wordy:
So the only thing we need to do is fixing this line to ensure it open another 'standalone' window, even for full-screen PWA
|
I am having a hard time to debug this, somehow devtools does not work in PWA for me. I am still not fully understanding if the
|
You could install this demo and try Source code: https://glitch.com/edit/#!/pwa-new-window |
Yeah you are right, that code opens a new tab for me when in fullscreen mode, so maybe that is actually a Chrome bug? |
Hi, Sorry for being a bit slow getting back onto this. Yeah, from my testing a well, I agree with what pingren is saying - this is not a regression, but likely something that never worked. I think with the example the pingren posted, raising this as a bug with the Chromium is probably be the best bet? The two PRs that have already been mentioned are both still required as they are what ensure that window.open is called "correctly": |
👍 feel free to report, some related issues: |
The second one looks close to the initial issue reported here that the second PR is working around - I'll follow that one. For the specific issue we are now seeing, I have created https://bugs.chromium.org/p/chromium/issues/detail?id=1351346 |
Update on this - This should now be resolved in upstream Chromium, and will hopefully make its way to the Chrome auto-updated version soon. Looks like it should be included in It looks like the dev branch of Chrome is on I am not sure what the release schedule is for Edge, and how quickly that will pick up this fix. |
Thank you for updates.
The trigger for Edge Beta and Stable major releases is an equivalent Chromium release. |
Anything to do here still? |
This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines. Happy Coding! |
The isStandalone() method used to determine if the app is running as a PWA doesn't work when the PWA is full screen (on Mac OS at least).
This is because, when the PWA is full screen, the display mode is
full screen
rather thanstandalone
.Unfortunately, we can't just also check for
display-mode: full screen
because this is also true when vscode is running in a regular browser tab but full screen.One possible solution could be to use both full screen and standalone initially but only trigger on a change to standalone or browser, not on a change from them.
Eg, something like:
The downsides of this are.
We could shift the impact of 1 a bit, by not considering an instance as a PWA on startup if it is full screen.
So if you open standalone and go full screen it remains a PWA, but if you start in full screen (is that even possible) then it would think it is a browser tab.
Another option, would be to consider
display-mode: full screen
the same asdisplay-mode: standalone
. This would always result in the desired effect for a PWA, but would mean that when running in a chrome tab, actions like "New Window" would instead open in a new window (or the PWA if it exists), rather than a new tab in the current browser instance.The ideal solution would be to distinguish between full screen in a browser tab and full screen in a PWA somehow, but I have not found a way in which that can be done yet.
The text was updated successfully, but these errors were encountered: