| Index: third_party/WebKit/Source/core/input/EventHandler.cpp
|
| diff --git a/third_party/WebKit/Source/core/input/EventHandler.cpp b/third_party/WebKit/Source/core/input/EventHandler.cpp
|
| index 37781e1a21258da736dafa23dfceb4ff2399934a..e7e0fdfb78c102830b8c383155d16be1356b80b0 100644
|
| --- a/third_party/WebKit/Source/core/input/EventHandler.cpp
|
| +++ b/third_party/WebKit/Source/core/input/EventHandler.cpp
|
| @@ -1530,8 +1530,19 @@ WebInputEventResult EventHandler::handleMouseReleaseEvent(const PlatformMouseEve
|
| // because the mouseup dispatch above has already updated it
|
| // correctly. Moreover, clickTargetNode is different from
|
| // mev.innerNode at drag-release.
|
| - clickEventResult = toWebInputEventResult(clickTargetNode->dispatchMouseEvent(mev.event(),
|
| - EventTypeNames::click, m_clickCount));
|
| +
|
| + MouseEvent* event = MouseEvent::create(
|
| + EventTypeNames::click,
|
| + clickTargetNode->document().domWindow(),
|
| + mev.event(), m_clickCount, nullptr);
|
| +
|
| + // This is to suppress sending click events for non-primary buttons.
|
| + // But still doing default action like opening a new tab for middle
|
| + // click (crbug.com/255).
|
| + if (mev.event().button() != MouseButton::LeftButton)
|
| + event->stopPropagation();
|
| +
|
| + clickEventResult = toWebInputEventResult(clickTargetNode->dispatchEvent(event));
|
| }
|
| }
|
|
|
|
|