You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2018/12/19 12:36:06 UTC

[GitHub] jcesarmobile closed pull request #69: GH-68 (ios): Support for disabling 3D Touch link previews

jcesarmobile closed pull request #69: GH-68 (ios): Support for disabling 3D Touch link previews
URL: https://github.com/apache/cordova-plugin-wkwebview-engine/pull/69
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/README.md b/README.md
index 0bafd32..e6bf628 100644
--- a/README.md
+++ b/README.md
@@ -96,6 +96,15 @@ window.WkWebView.allowsBackForwardNavigationGestures(true)
 window.WkWebView.allowsBackForwardNavigationGestures(false)
 ```
 
+Disabling 3D Touch Link Previews
+-----------
+
+In order to disable preview popups when hard pressing links in iOS, you can set the following preference in your `config.xml`:
+
+```xml
+<preference name="Allow3DTouchLinkPreview" value="false" />
+```
+
 Limitations
 --------
 
diff --git a/src/ios/CDVWKWebViewEngine.m b/src/ios/CDVWKWebViewEngine.m
index e6778c8..b337548 100644
--- a/src/ios/CDVWKWebViewEngine.m
+++ b/src/ios/CDVWKWebViewEngine.m
@@ -283,6 +283,7 @@ - (void)updateSettings:(NSDictionary*)settings
     }
 
     wkWebView.allowsBackForwardNavigationGestures = [settings cordovaBoolSettingForKey:@"AllowBackForwardNavigationGestures" defaultValue:NO];
+    wkWebView.allowsLinkPreview = [settings cordovaBoolSettingForKey:@"Allow3DTouchLinkPreview" defaultValue:YES];
 }
 
 - (void)updateWithInfo:(NSDictionary*)info


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org