Chromium Code Reviews| Index: third_party/WebKit/Source/core/events/MouseEvent.cpp |
| diff --git a/third_party/WebKit/Source/core/events/MouseEvent.cpp b/third_party/WebKit/Source/core/events/MouseEvent.cpp |
| index 943a33e71c2d3d2797810a8027c2d55900541b6d..718327dd718b5c871dce374e6a85a9a10883d464 100644 |
| --- a/third_party/WebKit/Source/core/events/MouseEvent.cpp |
| +++ b/third_party/WebKit/Source/core/events/MouseEvent.cpp |
| @@ -294,6 +294,10 @@ DispatchEventResult MouseEventDispatchMediator::dispatchEvent(EventDispatcher& d |
| if (mouseEvent.type() != EventTypeNames::click || mouseEvent.detail() != 2) |
|
mustaq
2016/04/25 20:12:43
This |if| suggests that we would reach Line 297 on
Navid Zolghadr
2016/04/25 20:17:38
That is right. And we should suppress the dblclick
mustaq
2016/04/25 20:47:34
I see. Please update the CL description accordingl
Navid Zolghadr
2016/04/26 17:04:07
Done.
|
| return dispatchResult; |
| + // Do not send dblclick event for middle click |
|
dtapuska
2016/04/25 19:59:36
Can we update the comment so it matches the code?
Navid Zolghadr
2016/04/26 17:04:07
Done.
|
| + if (mouseEvent.button() != MouseButton::LeftButton) |
| + return dispatchResult; |
| + |
| // Special case: If it's a double click event, we also send the dblclick event. This is not part |
| // of the DOM specs, but is used for compatibility with the ondblclick="" attribute. This is treated |
| // as a separate event in other DOM-compliant browsers like Firefox, and so we do the same. |