Skip to content
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

New windows become disconnected from the original PWA #79

Closed
filips123 opened this issue Nov 9, 2021 · 6 comments
Closed

New windows become disconnected from the original PWA #79

filips123 opened this issue Nov 9, 2021 · 6 comments
Labels
bug Something isn't working
Milestone

Comments

@filips123
Copy link
Owner

filips123 commented Nov 9, 2021

Description

New windows become disconnected from the original PWA.

This only applies to windows opened by PWAs (for example, using target="_blank" links or window.open), but not windows opened by a user with app/context menus, keyboard shortcuts or shift-clicking on links.

On Windows, this means new windows will use the normal Firefox icon and probably merge with the normal Firefox shortcut in the taskbar. On Linux and macOS, this won't be so noticeable due to other issues. It will also cause them to lose functionality of changing window colors and will always have an address bar displayed.

Steps to Reproduce

  1. Change PWA settings to force links into a new window.
  2. Open any PWA with target="_blank" links.
  3. Shift-click on any link.
  4. See that new window is "disconnected" from the original PWA.

Possible Solution

This could be fixed if there is an easy way to intercept the opening of every new window, and pass it window.gFFPWASiteConfig from the original window just after it is created. I implemented this for some windows, but don't know how to do it for all windows.

@filips123 filips123 added the bug Something isn't working label Nov 9, 2021
filips123 added a commit that referenced this issue Jun 1, 2022
This passes a site config from the opener window to a new one and prevents some windows from becoming disconnected. However, this fix only applies to windows opened by shift-clicking on links, so windows opened using `target="_blank"` links or `window.open` will still become disconnected.
@jamesharr
Copy link

I'm having a similar problem, but probably distinct.

I'm running Google Chat (chat.google.com) in Firefox PWA. When I click a link, say to a news website, I'd like to have it open in the system web browser (Firefox, default profile), but it loads in the PWA's window, replacing the PWA. If I use the context menu to open it in a new tab, similar results. Opening in a new window seems to use the same profile as the PWA, but at least doesn't replace the PWA.

Is this the same or separate issue?

@filips123
Copy link
Owner Author

If you want external links to open in a default browser, you can enable "Open out-of-scope URLs in a default browser" in the settings and add accounts.google.com to the "Domains always allowed to be opened in the PWA browser" input.

@jamesharr
Copy link

This is probably what I want, but I'm struggling to find these settings.

I've looked under the PWAsForFirefox settings (1), the individual App settings (2), and the Profile settings (3). I even took a peek at the Add-On page for PWAsForFirefox, the general firefox settings page, and even about:config to see if I could find these and I can't seem to locate it. Do I need to be running an alpha/beta build of this extensions to see these settings?

Image 1:
image

Image 2:
image
image

Image 3:
image

@filips123
Copy link
Owner Author

You need to open your PWA, open its browser menu and go to settings.

menu

settings

@jamesharr
Copy link

Ahh! Thank you!

@filips123 filips123 added this to the 2.3.0 milestone Dec 24, 2022
@filips123
Copy link
Owner Author

This issue has mostly been fixed by 5586d7e.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

No branches or pull requests

2 participants