chrome 在拖动时将光标设置为文本,为什么? [英] chrome sets cursor to text while dragging, why?

查看:25
本文介绍了chrome 在拖动时将光标设置为文本,为什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用程序有许多拖放功能.拖动时,我希望光标更改为某个抓取光标.Internet Explorer 和 Firefox 对此工作正常,但 Chrome 总是将光标更改为文本光标.

My application has many drag and drop features. While dragging I want the cursor to change to some grab cursor. Internet Explorer and Firefox work fine for this, but Chrome always changes the cursor to the text cursor.

推荐答案

这些解决方案都不适合我,因为代码太多.

None of these solutions worked for me because it's too much code.

我使用自定义 jQuery 实现进行拖动,在 mousedown 处理程序中添加这一行在 Chrome 中对我有用.

I use a custom jQuery implementation to do the drag, and adding this line in the mousedown handler did the trick for me in Chrome.

e.originalEvent.preventDefault();

这篇关于chrome 在拖动时将光标设置为文本,为什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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