cordova-plugin-ionic-webview
cordova-plugin-ionic-webview copied to clipboard
Enabling allowsBackForwardNavigationGestures on WKWebView
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?
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!