Commit d123fd73 authored by Jongmok Kim's avatar Jongmok Kim Committed by Commit Bot

Fix tab to close only if middle click up

In the function ‘Tab:OnMouseReleased’, fix the tab to close only if the mouse event is a middle click.

Bug: 947613
Change-Id: I7248b014f9774fe33f49de7f8c8f1ef08cc9d862
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2024134Reviewed-by: default avatarConnie Wan <connily@chromium.org>
Commit-Queue: Connie Wan <connily@chromium.org>
Cr-Commit-Position: refs/heads/master@{#736196}
parent 3fcca958
......@@ -533,7 +533,7 @@ void Tab::OnMouseReleased(const ui::MouseEvent& event) {
// Close tab on middle click, but only if the button is released over the tab
// (normal windows behavior is to discard presses of a UI element where the
// releases happen off the element).
if (event.IsMiddleMouseButton()) {
if (event.IsOnlyMiddleMouseButton()) {
if (HitTestPoint(event.location())) {
controller_->CloseTab(this, CLOSE_TAB_FROM_MOUSE);
} else if (closing_) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment