[
https://issues.apache.org/jira/browse/CB-9685?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14972442#comment-14972442
]
ASF GitHub Bot commented on CB-9685:
------------------------------------
GitHub user EddyVerbruggen opened a pull request:
https://github.com/apache/cordova-ios/pull/174
CB-9685 Enhanced the fix for the iOS9 longpress magnifying glass issue
This feature is now disabled by default and can be enabled for longpress in
`config.xml`:
`<preference name="SuppressesLongPressGesture" value="true" />`
When 3D Touching the webview (apply pressure during your touch) the
magnification glass will also pop up. It won't even wait for a longpress in
this case. To disable this issue as well, add this to `config.xml`:
`<preference name="Suppresses3DTouchGesture" value="true" />`
Note that if the former is true, the latter is ignored since they
essentially use the same gesture `UILongPressGestureRecognizer` (which is a
shame but that's how Apple implemented it). The other way around works fine, so
to have the behavior of the previous version of this plugin, you'd do:
```xml
<preference name="SuppressesLongPressGesture" value="true" />
<preference name="Suppresses3DTouchGesture" value="false" />
```
Omitting the properties is the same as setting both to`false`.
The reason for having the developer explictly enabling these features is
that disabling longpress may break text selection (most relevantly in input
fields).
The reason there's a sep property for 3D Touch is it will break onclick
handlers, but ontouchend works just fine, so it really depends on your
app/framework if it's a workable fix.
Please merge this so I can sleep better at night.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/EddyVerbruggen/cordova-ios master
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/cordova-ios/pull/174.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #174
----
commit b6348f7a0cb55ca3972334cb40ad310823792fa9
Author: EddyVerbruggen <[email protected]>
Date: 2015-09-22T10:02:36Z
CB-9685 A fix for the magnifying glass popping up on iOS9 when longpressing
the webview
commit 842997cba173ca90bd5e4f1943653533be69942b
Author: EddyVerbruggen <[email protected]>
Date: 2015-10-24T05:58:58Z
Merge remote-tracking branch 'upstream/master'
commit 371c136315b0c4f481ee479242dd769c4280b932
Author: EddyVerbruggen <[email protected]>
Date: 2015-10-24T06:41:07Z
CB-9685 A fix for the magnifying glass popping up on iOS9 when longpressing
the webview. This is now disabled by default and can be enabled for longpress
in config.xml:
<preference name="SuppressesLongPressGesture" value="true" />
and also for 3D Touch:
<preference name="Suppresses3DTouchGesture" value="true" />
note that if the former is true, the latter is ignored
----
> A fix for the magnifying glass popping up on iOS9 when longpressing the
> webview
> -------------------------------------------------------------------------------
>
> Key: CB-9685
> URL: https://issues.apache.org/jira/browse/CB-9685
> Project: Apache Cordova
> Issue Type: Improvement
> Components: CordovaLib, iOS
> Reporter: Eddy Verbruggen
> Assignee: Shazron Abdullah
> Labels: cordova-ios-4.0.x
>
> When pressing the webview for 500ms on iOS9 a magnification glass pops up. On
> UIWebView the popup is always at the top of the page (see the screenshot in
> the readme here:
> https://github.com/EddyVerbruggen/cordova-plugin-ios-longpress-fix), on
> WKWebView the popup is where your finger is.
> On UIWebView we have yet to find a non-native way (read: CSS) to fix the
> problem, but on WKWebView a few lines of CSS seem to fix the issue.
> This improvement is aimed at resolving the problem for UIWebView. There is no
> reason not to include a fix for WKWebView as well, other than I didn't invest
> time in it because of the CSS workaround.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]