Cordova-plugin-ionic-webview: Enabling allowsBackForwardNavigationGestures on WKWebView

Created on 25 May 2020  路  4Comments  路  Source: ionic-team/cordova-plugin-ionic-webview

Newer iPhones don't have a back button and users are used to being able to navigate back with a left-to-right swipe. WKWebView disables this behavior by default but it can be enabled with the allowsBackForwardNavigationGestures property of the WKWebView. I'm wondering if there's a way to set this property with this plugin or if not are there any plans to support this at some point?

docs

All 4 comments

it's not documented, but you can use <preference name="AllowBackForwardNavigationGestures" value="true" />

That's awesome, thanks. Probably worth adding to the docs

@jcesarmobile Is it possible to set this preference dynamically from JavaScript?

just like cordova-plugin-wkwebview-engine, it can be set like this:

window.WkWebView.allowsBackForwardNavigationGestures(true) // or false

I want to prevent or allow AllowsBackForwardNavigationGestures for some pages in my project, but i can't find any way to set this preference 馃槄.

so i think if there is any way to set this preference from Javascript, That'll be awesome.

This pull request will allow it when the team merge it!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

FarhadG picture FarhadG  路  6Comments

slymeng picture slymeng  路  5Comments

BorntraegerMarc picture BorntraegerMarc  路  5Comments

CodeWithOz picture CodeWithOz  路  8Comments

lincolnthree picture lincolnthree  路  7Comments