luisVargasGu edited a comment on issue #571:
URL: 
https://github.com/apache/cordova-plugin-inappbrowser/issues/571#issuecomment-854795080


   > > I can't see how I'd prevent navigation without using beforeload, though 
I'm maybe misunderstanding.
   > 
   > You can't, that's effectively the problem. I had to drop that requirement 
(which I didn't want to do) because `beforeload` doesn't work at all.
   > 
   > You might be able to rig those links using `window.open` with the target 
`_blank`. Cordova should recognize that as a system browser open request, but 
that'll change the behavior of the page for people not using the In App Browser 
as well and open those links in separate tabs/windows.
   > 
   > I spent about a collective month or so on this issue and came out empty. 
Without the event working properly there's nothing you can do that I'm aware of 
to achieve the same functionality.
   
   To add insult to injury: I don't know if it's specific to angular but 
`window.open` with the target `_blank` does nothing when inside a Cordova 
inAppBrowser so we had to opt for the target `_system` to get it to open the 
url within the Cordova app wrapper. Which is also not the required behaviour 
because we need external links to open in the system browser of the mobile 
device instead of within the app because then you can't navigate back to where 
you where on an IOS device because they don't have a built in back button, and 
using the toolbar doesn't allow for a seamless looking experience.
   
   Furthermore, even if the behaviour did work more than a single time without 
killing the listener there is an issue with `beforeload` and OIDC 
authentication flows. Even if you have a callback function like this:
   
   `
   function beforeloadCallBack(params, callback) {
       callback(params.url);
   }
   `
   
   That does nothing more than just listen and redirect It does not work with 
OIDC flows.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to