Opened 12 years ago

Closed 12 years ago

#6839 closed defect (fixed)

[Patch] OSX: Dnd Moveable stuck to cursor on right click

Reported by: Chris Mitchell Owned by: Eugene Lazutkin
Priority: high Milestone: 1.2
Component: DnD Version: 1.1.1
Keywords: Cc:
Blocked By: Blocking:

Description

Run the dojo test page :/dojo/tests/dnd/test_moveable.html in Mac Firefox, Safari, or Webkit. When right clicking on the moveable DOM, the dragged nodes remain stuck to the cursor with no way to release them.

In Mac, the mouse event 's property "button" is different from others platforms e.g.Windows,Linux. Right click in Mac, event.button=2 when mouse down; event.button= 0 when mouse up. But in other platforms, the event.button=2 of right click when both mouse down and mouse up.

Attachments (1)

patch.txt (425 bytes) - added by Chris Mitchell 12 years ago.

Download all attachments as: .zip

Change History (4)

comment:1 Changed 12 years ago by Eugene Lazutkin

Milestone: 1.2
Status: newassigned

comment:2 Changed 12 years ago by Chris Mitchell

Summary: OSX: Dnd Moveable stuck to cursor on right click[Patch] OSX: Dnd Moveable stuck to cursor on right click

Patch submitted under CLA:

Index: /dojo/dnd/Mover.js =================================================================== --- /dojo/dnd/Mover.js (revision 19055) +++ /dojo/dnd/Mover.js (working copy) @@ -44,6 +44,9 @@

if(this.mouseButton == e.button){

this.destroy();

}

+ if(navigator.appVersion.indexOf("Macintosh")>-1&&this.mouseButton==2&&e.button==0){ + this.destroy(); + }

}, utilities onFirstMove: function(){


Changed 12 years ago by Chris Mitchell

Attachment: patch.txt added

comment:3 Changed 12 years ago by Eugene Lazutkin

Resolution: fixed
Status: assignedclosed

(In [13825]) dnd: special treatmeant of the right mouse button on Safari/Mac?. Fixes #6839. !strict. Thank you, Chris Mitchell!

Note: See TracTickets for help on using tickets.