在iOS中停用文字选择标注 [英] Disable text selection callouts in iOS
本文介绍了在iOS中停用文字选择标注的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我知道当用户长按 link 时可以使用以下方法禁用标注:
I know you can disable the callout when a user long-taps on a link using this:
body {
-webkit-touch-callout: none !important;
}
a {
-webkit-user-select: none !important;
}
但是文本选择菜单呢?我的用例是一个 contentEditable
区域,应允许用户选择内容,但该标注出现在应用程序自己的格式菜单顶部.
But what about the text selection menu? My use case is a contentEditable
region in which the user should be allowed to select content, but the callout appears on top of the app's own formatting menu.
这是我指的标注:
推荐答案
这是我不确定的答案,但可以使用
-webkit-user-select: none; /* Chrome all / Safari all */
-moz-user-select: none;/* Firefox all */
-ms-user-select: none;
这篇关于在iOS中停用文字选择标注的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文