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

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

Issue 12816: Fixed issue where middle click doesn't activiate when not over its 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 5817)
+++ chrome/browser/views/tabs/tab.cc (working copy)
@@ -156,7 +156,11 @@
// 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())
+
+ // Close tabs 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() && HitTest(event.location()))
delegate_->CloseTab(this);
}
« 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