问题描述
当使用jQuery UI .draggable()时,我似乎无法在Webkit浏览器中禁用文本选择.我尝试过以各种组合使用特定于Webkit的CSS(-webkit-user-select和-webkit-user-drag),但是没有任何运气.
I can't seem to disable text-selection in webkit browsers when using jQuery UI .draggable(). I've tried using the webkit specific css (-webkit-user-select and -webkit-user-drag) in various combinations but haven't had any luck.
这是一个jsfiddle,您可以在其中重现该问题: http://jsfiddle.net/dmosher/8ZGLR/
Here's a jsfiddle where you can reproduce the problem: http://jsfiddle.net/dmosher/8ZGLR/
推荐答案
disableSelection是您的朋友在这里.
disableSelection is your friend here.
您可能想要创建一个帮助程序,以便看起来有些东西被拖了.
You may want to create a helper so it looks obvious that something is being dragged.
这篇关于使用jQuery UI .draggable时,如何在Webkit浏览器中禁用文本选择?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!