Opened 9 years ago

Closed 7 years ago

Last modified 7 years ago

#5678 closed bug (duplicate)

Dragging cursor does't change in Safari/Chrome

Reported by: bartaz Owned by:
Priority: minor Milestone:
Component: ui.mouse Version: 1.8.1
Keywords: Cc:
Blocked by: Blocking:

Description

Webkit browsers (Safari and Chrome) force cursor to be text while dragging even if other one is specified in draggable/sortable options or even in CSS.

It seems that it's caused by not firing event.preventDefault() in webkit browsers in ui.mouse._mouseDown (see: http://github.com/jquery/jquery-ui/blob/master/ui/jquery.ui.mouse.js#L92).

Calling event.preventDefault() for all browsers in ui.mouse._mouseDown fixes this issue, but I assume it causes another (as commented in the source).

Change History (10)

comment:1 Changed 9 years ago by heycam

(trying to add myself to cc list)

comment:2 Changed 9 years ago by arturadib

Quick bug fix (modified from source: http://forum.jquery.com/topic/chrome-text-select-cursor-on-drag):

Do this:

$(element)[0].onselectstart = function () { return false; };

to all your .draggable() elements. It fixed the bug for me with Chrome+Safari on OS X using jQuery UI 1.8.1.

comment:3 in reply to:  2 Changed 9 years ago by heycam

Replying to arturadib:

Quick bug fix (modified from source: http://forum.jquery.com/topic/chrome-text-select-cursor-on-drag):

This workaround worked for me, thanks!

comment:4 Changed 9 years ago by Scott González

We should probably just call .disableSelection() whenever we handle mouse start.

comment:5 Changed 9 years ago by peol

This line also cancels out blur events in input boxes inside sortables in Firefox. Removing it fixes it for me, but I guess could have implications on other widgets. I haven't found a way to narrow this down yet, will try to setup a smaller test case today or perhaps tomorrow.

comment:6 in reply to:  5 Changed 9 years ago by peol

Replying to peol:

This line also cancels out blur events in input boxes inside sortables in Firefox. Removing it fixes it for me, but I guess could have implications on other widgets. I haven't found a way to narrow this down yet, will try to setup a smaller test case today or perhaps tomorrow.

Just when I posted it, I came up with a positive test case in FF 3.6.8 in Windows: http://jsfiddle.net/Uhsm6/

comment:7 in reply to:  4 Changed 8 years ago by Jörn Zaefferer

Replying to scott.gonzalez:

We should probably just call .disableSelection() whenever we handle mouse start.

That can't be the right solution anymore, as we're getting rid of disableSelection. Maybe this has been adressed already in the rewrite?

comment:8 Changed 7 years ago by Scott González

Resolution: duplicate
Status: newclosed

comment:9 Changed 7 years ago by Scott González

Duplicate of #6174.

comment:10 Changed 7 years ago by Scott González

Milestone: TBD

Milestone TBD deleted

Note: See TracTickets for help on using tickets.