简体   繁体   English

如何使GWT / GXT RichTextEditor工具提示无法选择?

[英]How to make GWT/GXT RichTextEditor Tooltip unselectable?

I have a RichTextEditor class (extended from com.extjs.gxt.ui.client.widget.LayoutContainer) in which I use a (own) tooltip class for text tooltips for links like this: https://jsfiddle.net/hkyLgam6/ . 我有一个RichTextEditor类(从com.extjs.gxt.ui.client.widget.LayoutContainer扩展),在该类中,我使用(自己的)工具提示类来编写文本工具提示,以实现这样的链接: https : //jsfiddle.net/hkyLgam6/

In my project the tooltips are only shown when you hover over the link but that's maybe not important. 在我的项目中,仅当您将鼠标悬停在链接上时才会显示工具提示,但这可能并不重要。

To be able to properly delete the links and other things, I want to make the tooltips unselectable. 为了能够正确删除链接和其他内容,我想使工具提示不可选择。 Because every time you select the link (in example by double clicking on it) the tooltip text gets selected too and the link removing fails in example. 因为每次选择链接(例如,双击链接)时,工具提示文本也会被选中,因此在示例中,链接删除失败。

Trying to prevent that with CSS (like in the jsfiddle example above): 尝试使用CSS防止这种情况发生(例如上述jsfiddle示例):

-webkit-touch-callout: none;
-webkit-user-select: none;
-moz-user-select: -moz-none;
-khtml-user-select: none;
-o-user-select: none;
user-select: none;

didn't work so I would be very grateful for any idea to accomplish that. 没有用,所以我非常感谢能实现这一目标的任何想法。

我认为您只是忘记了Internet Explorer的CSS(至少是较旧的CSS):

-ms-user-select: none;

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM