Skip to main content

Search and Top Navigation

#5678 closed bug (duplicate)

Opened May 31, 2010 12:45PM UTC

Closed June 05, 2012 09:16PM UTC

Last modified October 11, 2012 09:15PM UTC

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).

Attachments (0)
Change History (10)

Changed July 04, 2010 11:22PM UTC by heycam comment:1

(trying to add myself to cc list)

Changed July 08, 2010 10:09PM UTC by arturadib comment:2

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.

Changed July 08, 2010 11:10PM UTC by heycam comment:3

Replying to [comment:2 arturadib]:

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

This workaround worked for me, thanks!

Changed August 27, 2010 04:08PM UTC by scottgonzalez comment:4

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

Changed September 08, 2010 01:47PM UTC by peol comment:5

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.

Changed September 08, 2010 01:51PM UTC by peol comment:6

Replying to [comment:5 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/

Changed February 27, 2012 04:07PM UTC by jzaefferer comment:7

Replying to [comment:4 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?

Changed June 05, 2012 09:16PM UTC by scottgonzalez comment:8

resolution: → duplicate
status: newclosed

Changed June 05, 2012 09:16PM UTC by scottgonzalez comment:9

Duplicate of #6174.

Changed October 11, 2012 09:15PM UTC by scottgonzalez comment:10

milestone: TBD

Milestone TBD deleted