14

iOS9_glass

I have tested several workarounds to disable the annoying magnifying glass with css, but on my iOS9 meteor cordova build it appears for a moment and fades out after some ms.

it was working on iOS 8 but not on iOS 9 now with this css code:

body, body * {
    -webkit-user-select: none !important;
    user-select: none !important;
    -webkit-user-callout: none !important;
    -webkit-touch-callout: none !important;
}
input, textarea {
    -webkit-user-select: text !important;
    user-select: text !important;
    -webkit-user-callout: default !important;
    -webkit-touch-callout: default !important;
}
*{
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none; /* Firefox all */
    -ms-user-select: none; /* IE 10+ */
    user-select: none;
    -webkit-user-drag: none;
    -webkit-user-modify: none;
}

I missed something for iOS 9?

4

2 回答 2

11

是的,它与iOS9有关。由于您是 Cordova 用户,此插件将为您解决问题: https ://github.com/EddyVerbruggen/cordova-plugin-ios-longpress-fix

它与在处理 css 中的 -webkit-user-select: none 之前执行的 UILongPressGestureRecognizer 有关。

我希望这能够帮到你。

于 2015-09-23T10:24:31.557 回答
3

Frederik 提到的插件现在已内置到 cordova 中,请参阅https://github.com/apache/cordova-ios/pull/174

启用修复<preference name="SuppressesLongPressGesture" value="true" />插入config.xml

于 2016-05-13T08:03:54.563 回答