#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 13 years ago by
comment:2 follow-up: 3 Changed 13 years ago by
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 Changed 13 years ago by
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 follow-up: 7 Changed 13 years ago by
We should probably just call .disableSelection() whenever we handle mouse start.
comment:5 follow-up: 6 Changed 13 years ago by
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 Changed 13 years ago by
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 Changed 11 years ago by
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 11 years ago by
Resolution: | → duplicate |
---|---|
Status: | new → closed |
(trying to add myself to cc list)