Bug 49297

Summary: 'mouseup' directly following 'mousedown' but no 'click' event fired on a <button>
Product: WebKit Reporter: Roy Goldman <roygoldman>
Component: WebCore Misc.Assignee: Nobody <webkit-unassigned>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: rniwa
Priority: P3    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Windows XP   
Attachments:
Description Flags
ZIP file containing an HTML file demonstrating issue along with an AVI video of this issue none

Description Roy Goldman 2010-11-09 19:15:37 PST
As you can see in the attached html file (and a video demonstrating the issue), "click" is not firing reliably corresponding to matching "mousedown" and "onmouseup" events on a <button>.

More specifically, my understanding is that if I press the mouse button down over a <button> element (which fires 'mousedown'), and then release the mouse button while my pointer is still over that <button>, I should always get not only a 'mouseup' event on that element but also a 'click.'

However, in the attached html document, it's very easy to get a situation where the 'click' event does not fire, as evidenced by the Click counter not matching the Down and Up counters. Please see the attached video as well. The problem seems to be worse if the mouse pointer moves in between down and up, but in all cases the mouse pointer is staying over/within the <button>.

Is this by design? If so, what is the filter that prevents click from firing in some cases?

Reproduced in (and video from) webkit-r71499.
Comment 1 Roy Goldman 2010-11-09 19:17:39 PST
Created attachment 73451 [details]
ZIP file containing an HTML file demonstrating issue along with an AVI video of this issue
Comment 2 Ryosuke Niwa 2011-08-15 14:19:04 PDT

*** This bug has been marked as a duplicate of bug 39620 ***