Closed liamcharmer closed 12 months ago
Me being the dumbo I am.
You can use the event handler shouldOverrideUrlLoading
Then you just do the following:
if (args.navigationType == "linkClicked") {
args.cancel = true;
this.$refs.webView.nativeView.loadUrl(args.url);
}
As the apps only open on hyperlink clicks it seems! So just cancel the request and load the URL via the browser.
Hi,
how do we prevent webviews from opening the app version of the website.
for Example if you have Amazon installed, and your webview opens a hyperlink of amazon, it will open the amazon app.
I've looked into the
shouldOverrideUrlLoading
handler but have had no luck...Something like this? https://stackoverflow.com/questions/76054329/stop-wkwebview-from-opening-link-in-external-app