pwa-builder / PWABuilder-CLI

Node.js tool for App Generation
Other
1.63k stars 142 forks source link

target="_blank" Not supported ? #261

Closed SrMordred closed 4 years ago

SrMordred commented 7 years ago

Is possible to open a new browser window(outside manifold) from a hosted site? target="_blank"` are ignored and they jump to another link.

boyofgreen commented 7 years ago

which platform? Windows can do it with newWindow() and chrome pinned should work fine. Mostly default is that new windows open in the default browser, as "_blank" is outside the manifest scope.

SrMordred commented 7 years ago

I tried on Android. It just ignores "_blank" even if the url is on the same domain.

boyofgreen commented 7 years ago

okay, there is a work around: http://stackoverflow.com/questions/21417004/opening-an-url-in-a-new-browser-window-in-android-working-with-phonegap let me know if that works for you. The eventual polyfill-less one should support this

SrMordred commented 7 years ago

Nop. I tried also window.open(url,"_system") without results. edit: The function above open the url but without exiting manifold.

bettysteger commented 5 years ago

I would like to open up external links in another tab outside the app.. tested with iOS, I added

<allow-navigation href="*" />

to allow external links, but they open up in the app, so i can't get back to the app because i am on the wrong URL now

Mighty683 commented 5 years ago

This is overall PWA issue.

davrous commented 4 years ago

Hi! We dropped support for iOS. Our new Android packaging uses TWA and this scenario just works now. For Hosted Web Apps / Win10 Store Apps, _blank should by default open the default installed browser in an external window. To better control which links are opened inside the PWA context or outside in the default browser, please have a look to this documentation: https://docs.microsoft.com/en-us/windows/uwp/launch-resume/web-to-app-linking and more specifically to the windows-app-web-link file. Closing this issue.