Changes between Initial Version and Version 2 of Ticket #5967


Ignore:
Timestamp:
Aug 18, 2010, 8:26:00 AM (10 years ago)
Author:
Scott González
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #5967

    • Property Component changed from ui.core to ui.mouse
  • Ticket #5967 – Description

    initial v2  
    1 Our project uses jQuery draggable and droppable to implement file moving.
    2 I've got a bug on Mac Safari with this dnd operation.
    3 I shall attache the recording my QA gave me, you can download the player at our website http://www.webex.com/downloadplayer.html.
    4 My remedy is in "$.ui.mouse._mouseDown",
    5 change this line of code btnIsLeft = (event.which == 1) to below:
     1Ctrl+Click on Mac acts as right click, but is reported as left click in Safari.
     2
     3My remedy is in $.ui.mouse._mouseDown, change:
     4{{{
     5btnIsLeft = (event.which == 1)
     6}}}
     7to:
     8{{{
    69btnIsLeft = ((navigator.platform.match(/mac|win|linux/i) || ["other"])[0].toLowerCase() == "mac") ? (!event.ctrlKey && event.which == 1) : (event.which == 1).
    7 
    8 It is because ctrl-click is treated as right click on mac, but according to the dnd code, right click (event.which === 3) won't trigger mouse start event.
    9 
    10 I found that Firefox on mac is OK with "event.which". I guess the best solution would be changing event.which in the very beginning that this event object is created by jQuery.
    11 
     10}}}