cordova-ios
cordova-ios copied to clipboard
Long press produces vibration (the same one accompanies the appearance of the text editing menu)
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
- [ x] I searched for existing GitHub issues
- [ x] I updated all Cordova tooling to most recent version
- [ x] I included all the necessary information above
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>
+1
looking for a fix for this for over an year
+1
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.
Closing as stale.