Firefox Mac, PC, and Win IE will fire a click, dblclick, mousedown, and mouseup event handlers on a control- or right-click. Safari does not. Safari will fire on a contextmenu event though. I suggest Safari adopts the Firefox Mac behavior. I suggest Safari also set the button parameter of the event object on right clicks as well.
Created attachment 5723 [details] clickReduction.html Note that the only event fired in Safari on a control- or right-click is 'contextmenu'.
Confirmed, very nice testcase.
Testing in Camino and Firefox shows that they show slightly different behaviour. On a right-click, both fire the oncontextmenu event. Camino never fires the mousedown event, and will sometimes fire the mouseup. Firefox always fires the mousedown and mouseup. Neither browser fires the click event for a right-click, contrary to what the original report describes. [Tested using Firefox 1.5 and Camino 1.0b1+].
Correction: Win IE will fire mousedown and mouseup on a right click (but nothing else), and Win Firefox will fire mousedown, mouseup, and click (but nothing else) on a right click.
Further correction: Correction: Win IE will fire contextmenu, mousedown and mouseup on a right click (but nothing else), and Win Firefox will fire contextmenu, mousedown, mouseup, and click (but nothing else) on a right click. (In reply to comment #4) > Correction: Win IE will fire mousedown and mouseup on a right click (but nothing else), and Win Firefox > will fire mousedown, mouseup, and click (but nothing else) on a right click.
I don't think it makes sense to fire the click event on a right-click. I think Safari should match the behaviour of WinIE and Firefox on OS X -- a right-click should trigger a mousedown, contextmenu, and mouseup.
This bug is also in Radar: <rdar://4432150>
Retitling bug. When using ctrl-click, the mouseup does appear to be dispatched, along with an extraneous click event.
Created attachment 21994 [details] patch to fix
Created attachment 21995 [details] Change log for patch
Robert, can you please include the ChangeLog entries as part of the patch?
Created attachment 22011 [details] single unified patch: change log update, code changes, test file.
Comment on attachment 22011 [details] single unified patch: change log update, code changes, test file. I already landed similar functionality in eventSender as part of another patch. I don't care a whole lot which approach we take, but my additional changes will make this patch invalid. So marking r-.
http://trac.webkit.org/changeset/34871 is the patch I was referring to in my above comments.
Created attachment 23044 [details] updated patch
Comment on attachment 23044 [details] updated patch Looks sane enough.
Landed in r35956.