RESOLVED FIXED 6595
Right-click does not fire mouseup event
https://bugs.webkit.org/show_bug.cgi?id=6595
Summary Right-click does not fire mouseup event
Beau Hartshorne
Reported 2006-01-16 11:51:54 PST
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.
Attachments
clickReduction.html (1.16 KB, text/html)
2006-01-16 11:53 PST, Beau Hartshorne
no flags
patch to fix (9.44 KB, patch)
2008-06-29 04:10 PDT, Robert Kroeger
no flags
Change log for patch (3.00 KB, patch)
2008-06-29 04:11 PDT, Robert Kroeger
no flags
single unified patch: change log update, code changes, test file. (12.20 KB, patch)
2008-06-30 16:45 PDT, Robert Kroeger
eric: review-
updated patch (6.07 KB, patch)
2008-08-27 16:06 PDT, Sam Weinig
eric: review+
Beau Hartshorne
Comment 1 2006-01-16 11:53:48 PST
Created attachment 5723 [details] clickReduction.html Note that the only event fired in Safari on a control- or right-click is 'contextmenu'.
Joost de Valk (AlthA)
Comment 2 2006-01-16 11:56:42 PST
Confirmed, very nice testcase.
Mark Rowe (bdash)
Comment 3 2006-01-16 12:18:58 PST
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+].
Beau Hartshorne
Comment 4 2006-01-16 12:22:39 PST
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.
Beau Hartshorne
Comment 5 2006-01-16 12:24:03 PST
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.
Mark Rowe (bdash)
Comment 6 2006-01-16 12:28:15 PST
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.
Sjoerd Mulder
Comment 7 2006-02-03 00:28:50 PST
This bug is also in Radar: <rdar://4432150>
Mark Rowe (bdash)
Comment 8 2008-06-20 20:49:22 PDT
Retitling bug. When using ctrl-click, the mouseup does appear to be dispatched, along with an extraneous click event.
Robert Kroeger
Comment 9 2008-06-29 04:10:32 PDT
Created attachment 21994 [details] patch to fix
Robert Kroeger
Comment 10 2008-06-29 04:11:01 PDT
Created attachment 21995 [details] Change log for patch
Mark Rowe (bdash)
Comment 11 2008-06-29 04:18:54 PDT
Robert, can you please include the ChangeLog entries as part of the patch?
Robert Kroeger
Comment 12 2008-06-30 16:45:12 PDT
Created attachment 22011 [details] single unified patch: change log update, code changes, test file.
Eric Seidel (no email)
Comment 13 2008-07-04 11:26:11 PDT
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-.
Eric Seidel (no email)
Comment 14 2008-07-06 09:52:03 PDT
http://trac.webkit.org/changeset/34871 is the patch I was referring to in my above comments.
Sam Weinig
Comment 15 2008-08-27 16:06:33 PDT
Created attachment 23044 [details] updated patch
Eric Seidel (no email)
Comment 16 2008-08-27 16:11:02 PDT
Comment on attachment 23044 [details] updated patch Looks sane enough.
Sam Weinig
Comment 17 2008-08-27 17:50:36 PDT
Landed in r35956.
Note You need to log in before you can comment on or make changes to this bug.