apache / cordova-ios

Apache Cordova iOS
https://cordova.apache.org/
Apache License 2.0
2.16k stars 988 forks source link

Long press produces vibration (the same one accompanies the appearance of the text editing menu) #982

Closed olosegres closed 1 year ago

olosegres commented 4 years ago

Bug Report

Problem

Problem is in vibration that appears after long press on any element

What is expected to happen?

Nothing should happens

What does actually happen?

Vibration, the same as when text select menu appears

Information

Suppressing via config does NOT work

<preference name="SuppressesLongPressGesture" value="true" />
<preference name="Suppresses3DTouchGesture" value="true" />

Suppressing via CSS does NOT work, only disable context menu (cut/copy/share)

-webkit-user-select: none;
-webkit-touch-callout: none;

cordova-plugin-ios-longpress-fix fixes it (with preference Suppress3DTouch=true), but it produces bugs with not working onClick handlers.

Command or Code

Just run any cordova app on a real device with one div in body and long press in any point, you will feel vibration.

<div style="width: 100%, height: 100%, -webkit-user-select: none; -webkit-touch-callout: none;">Example text</div>

Or use this boilerplate (do not forget to set correct signing in xcode):

git clone https://github.com/olosegres/react-cordova-boilerplate
cd react-cordova-boilerplate
npm i
cordova platform add ios
cordova run ios

Environment, Platform, Device

Tested on iPhone 6s with iOS 13.6.1 (don't know how to reproduce vibration in simulator)

Version information

Tested with many webview plugins, appears everywhere (I use cordova-plugin-ionic-webview) cordova-ios 6.1.1 (same in 5.1.0)

Checklist

lukemelia commented 3 years ago

I ran into this recently, and discovered that I was missing an entry in my config.xml:

    <feature name="GestureHandler">
        <param name="ios-package" value="CDVGestureHandler" />
        <param name="onload" value="true" />
    </feature>
speamy commented 3 years ago

+1

danieltanasec commented 3 years ago

looking for a fix for this for over an year

ven0ms99 commented 3 years ago

+1

dpogue commented 1 year ago

I've marked this issue as stale because it's been over a year with no further comments. If this is still an issue in the latest cordova-ios version and an up-to-date iOS version, please let us know. Otherwise, this issue will be closed.

dpogue commented 1 year ago

Closing as stale.