Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enabling allowsBackForwardNavigationGestures on WKWebView #574

Open
pschinis opened this issue May 25, 2020 · 4 comments
Open

Enabling allowsBackForwardNavigationGestures on WKWebView #574

pschinis opened this issue May 25, 2020 · 4 comments
Labels

Comments

@pschinis
Copy link

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?

@jcesarmobile
Copy link
Member

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

@pschinis
Copy link
Author

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

@xinhaoxx
Copy link

xinhaoxx commented Sep 1, 2020

@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.

@samuelbeaulieu
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants