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

查看:124
本文介绍了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天全站免登陆