在Chrome中单击并拖动光标 [英] Click and Drag Cursor in Chrome

查看:100
本文介绍了在Chrome中单击并拖动光标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个网络应用程序,我需要覆盖一些默认游标。

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.

我正在使用jquery,而且通常

I am using jquery, and the usual

$(document).css('cursor','default');

不起作用。

使用chrome似乎它不是在点击上,而是在鼠标移动上。所以我甚至试图做

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');
});

这似乎也不起作用。

我在Firefox中没有这个问题。

I do not have this issue in firefox though.

推荐答案

尝试在拖放时关闭任何文本选择根据 chrome拖动时将光标设置为文本,为什么?

Try turning off any text selection while drag and dropping as per chrome sets cursor to text while dragging, why?.

document.onselectstart = function(){return false; }

这篇关于在Chrome中单击并拖动光标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆