Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4688)

Unified Diff: chrome/browser/views/tabs/tab.cc

Issue 12810: Middle-click to close tabs activates even if mouse-up is not over tab.... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 12 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/tabs/tab.cc
===================================================================
--- chrome/browser/views/tabs/tab.cc (revision 6115)
+++ chrome/browser/views/tabs/tab.cc (working copy)
@@ -156,8 +156,8 @@
// Notify the drag helper that we're done with any potential drag operations.
// Clean up the drag helper, which is re-created on the next mouse press.
delegate_->EndDrag(canceled);
- if (event.IsMiddleMouseButton())
- delegate_->CloseTab(this);
+ if (event.IsMiddleMouseButton() && HitTest(event.location()))
+ delegate_->CloseTab(this);
}
bool Tab::GetTooltipText(int x, int y, std::wstring* tooltip) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698