IOs Cordova长按显示文本选择放大镜,即使文本选择禁用,如何删除? [英] IOs Cordova long-press shows text-select magnifying glass even with text-selection disabled, how to remove?
问题描述
我有一个非常奇怪的问题。在我的cordova应用程序在iOS上,我得到一个弹出文本选择放大镜,当我长按在应用程序的任何地方。
示例:
顶部的气泡被锁定在屏幕顶部,并且在将手指从一侧移动到另一侧时跟随我的x位置。
我试图添加以下css,人们说应该解决我的问题:
* {
-webkit-tap-highlight-color:rgba(0,0,0,0);
-webkit-touch-callout:none;
-webkit-user-select:none;
}
这没有帮助。看看web检查器中的事情,我可以确认这个css已成功添加到一切。我试过了一堆不同的变化的正常 touch-callout:none
和 user-select:none
没有任何帮助。
我也试图删除所有的javascript和所有的CSS,除了上述的一个简单的变化,放大镜仍然出现。
我如何才能让它消失?有没有任何插件可以导致这个问题?非常感谢任何帮助。
Cordova插件:
- com.mbppower.camerapreview
- cordova-plugin-statusbar
- cordova-plugin-whitelist
- plugin-keyboard
- org.apache.cordova.camera
- org.apache.cordova.console
- org.apache.cordova.device
- org.apache.cordova.dialogs
- org.apache.cordova.file
- org.apache.cordova.file-transfer
- org.apache.cordova.network-information
- org.apache.cordova。振动
Cordova版本:5.1.1
iOS版本:9.0.1的iPhone 5s
-webkit-user-select:none; $ c $
c>不工作。有一个插件可修复此问题。
https: //github.com/EddyVerbruggen/cordova-plugin-ios-longpress-fix
感谢Frederik Wessberg http://stackoverflow.com/a/32737049/741850
I have a very weird problem. In my cordova app on iOS I am getting a pop-up text-select magnifying glass when I long-press anywhere in the app.
Example:
The bubble at the top is locked to the top of the screen, and follow my x-position when moving my finger from side to side.
I have tried to add the following css which people say should fix my issue:
* {
-webkit-tap-highlight-color: rgba(0,0,0,0);
-webkit-touch-callout: none;
-webkit-user-select: none;
}
This does not help. Looking at things in the web-inspector, I can confirm that this css is successfully added to everything. I have tried a bunch of different variation of the normal touch-callout: none
and user-select: none
everyone suggest and nothing seem to help.
I have also tried to remove all javascript and all CSS except a simple variation of the above mentioned, and the magnifying glass still appears.
How can I get it to go away? Is there any plugin that can be causing this issue? Any help is much appreciated.
Cordova plugins:
- com.mbppower.camerapreview
- cordova-plugin-statusbar
- cordova-plugin-whitelist
- ionic-plugin-keyboard
- org.apache.cordova.camera
- org.apache.cordova.console
- org.apache.cordova.device
- org.apache.cordova.dialogs
- org.apache.cordova.file
- org.apache.cordova.file-transfer
- org.apache.cordova.network-information
- org.apache.cordova.vibration
Cordova version: 5.1.1 iPhone 5s with iOS version: 9.0.1
Apparently, in iOS 9 there is a bug which makes the -webkit-user-select: none;
not work. There is a plugin which fixes this
https://github.com/EddyVerbruggen/cordova-plugin-ios-longpress-fix
Thanks to Frederik Wessberg http://stackoverflow.com/a/32737049/741850
这篇关于IOs Cordova长按显示文本选择放大镜,即使文本选择禁用,如何删除?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!