Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Click and Drag Cursor in 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.

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.

like image 914
mfrancis107 Avatar asked Feb 23 '23 20:02

mfrancis107


1 Answers

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

like image 68
jakecar Avatar answered Feb 26 '23 22:02

jakecar