Back to Cordova

2021 02 01

slack-digest/2021-02-01.md

latest3.4 KB
Original Source

Cordova Slack Digest

Mon, 01 Feb 2021 08:42:23 GMT

User count: 4350

Join the conversation at slack.cordova.io

Channel #general (14 messages)


Mon, 01 Feb 2021 01:24:53 GMT

@ashankar says

I am having some issues with InappBrowser in a brand new ionic app…. cant seem to use “_blank” when creating a new window…

On the InAppBrowser repo, i found some similar sounding issues.. and have added the details here…

https://github.com/apache/cordova-plugin-inappbrowser/issues/829#issuecomment-770360624

Mon, 01 Feb 2021 01:25:11 GMT

@ashankar says

any tips on how to debug this would be appreciated

Mon, 01 Feb 2021 01:47:59 GMT

@norman137 says

What appears to be the problem? Pure cordova app appears work with _blank for me.

Mon, 01 Feb 2021 01:48:23 GMT

@norman137 says

You might be encountering an ionic bug.

Mon, 01 Feb 2021 02:02:28 GMT

@norman137 says

Or do you mean using https://developer.mozilla.org/en-US/docs/Web/API/Window/open browser's window.open from within the in app browser?

Mon, 01 Feb 2021 02:10:59 GMT

@ashankar says

I am using window.open… within the inapp browser… but that is a seperate thing … the first step would be to open a link in the InAppBrowser window….

Mon, 01 Feb 2021 02:11:45 GMT

@ashankar says

but you are correct… I was sort of on the same path…. tried a pure cordova app …. with _blank https://github.com/dpa99c/cordova-plugin-inappbrowser-test

Mon, 01 Feb 2021 02:12:32 GMT

@ashankar says

the InAppBrowser is working just fine here…. I could be facing an ionic issue

Mon, 01 Feb 2021 02:14:42 GMT

@norman137 says

inappbrowser open wit _blank works. window.open() with _blank (did not test any other configurations) doesn't work, at least not from console. But using window.open in your websites is not recommended to begin with

Mon, 01 Feb 2021 02:15:14 GMT

@norman137 says

So this could just be a webview behaviour: https://developer.mozilla.org/en-US/docs/Web/API/Window/open#avoid_resorting_to_window.open

Mon, 01 Feb 2021 02:50:13 GMT

@ashankar says

using window.open() in a website… is sort of out of my control… at least in this case…

Mon, 01 Feb 2021 03:05:39 GMT

@norman137 says

Do you know if window.open() is used as a response of a user gesture (like a click event)?

Haven't tested this but based on some reading, Safari will ignore window.open if not invoked as a user gesture response. This means window.open must be within a callstack from a user-initiated event. It can't be called asynchronously either.

Mon, 01 Feb 2021 03:22:55 GMT

@norman137 says

I just tested it... and it doesn't work in IAB, but it does work in safari browser.

Mon, 01 Feb 2021 03:24:31 GMT

@ashankar says

i have seen that bit .. it will always be a user input …. like a button click

Channel #cordova-android (1 messages)


Sun, 31 Jan 2021 11:01:59 GMT

@info460 says

Hello, I have the app which is asking for location permission when it need lication but its too late to ask for permission in this point. Is there a way how ti satisfy the permissions on app start? I found something on Internet about adding it in AndroidManifest.xml file but I found 11 instances of AndroidManifest.xml file in my project. Can someone clarify on this please