admin管理员组文章数量:1303353
I am working on a web app and I need to override some of the default cursors.
In chrome when I click and then drag it ALWAYS changes the cursor to text selection. I can not seem to find any way to override this.
I am using jquery, and the usual
$(document).css('cursor','default');
Does not work.
With chrome it seems that it brings it up not on the click, but on the mouse move. So I have even attempted to do
$(document).mousemove(function(){
$(document).css('cursor','default');
});
And that doesn't seem to work either.
I do not have this issue in firefox though.
I am working on a web app and I need to override some of the default cursors.
In chrome when I click and then drag it ALWAYS changes the cursor to text selection. I can not seem to find any way to override this.
I am using jquery, and the usual
$(document).css('cursor','default');
Does not work.
With chrome it seems that it brings it up not on the click, but on the mouse move. So I have even attempted to do
$(document).mousemove(function(){
$(document).css('cursor','default');
});
And that doesn't seem to work either.
I do not have this issue in firefox though.
Share asked Jun 17, 2011 at 15:44 mfrancis107mfrancis107 1,4011 gold badge13 silver badges21 bronze badges2 Answers
Reset to default 8Try turning off any text selection while drag and dropping as per chrome sets cursor to text while dragging, why?.
document.onselectstart = function(){ return false; }
It displays the text cursor because you are selecting Text while dragging (although you don't want to, but try just holding the mouse button, and moving it around the screen). To disable this, I would suggest you to use something like this
You may need to change the code in the link to disable all text, not just text within tag label. To disable the text while dragging, and when you release the mouse button to undo the changes made by disabling the text.
As soon as the text selection is disabled, Chrome should have no reason to display other cursors.
Hope this helps.
EDIT: I am new to stackoverflow, and did not know a real tag would not be displayed.
本文标签: javascriptClick and Drag Cursor in ChromeStack Overflow
版权声明:本文标题:javascript - Click and Drag Cursor in Chrome - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741667677a2391410.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论