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

Unified Diff: chrome/browser/ui/views/omnibox/omnibox_view_views.cc

Issue 10968049: Disable right button drag in omnibox (Closed) Base URL: http://git.chromium.org/chromium/src.git@new
Patch Set: Created 8 years, 3 months 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/ui/views/omnibox/omnibox_view_views.cc
diff --git a/chrome/browser/ui/views/omnibox/omnibox_view_views.cc b/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
index 0caa36c3a6cb67bf2f331aa47eda932c8ea98dca..688fb6a6445b7f5436d313ed726cbee19eabe461 100644
--- a/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
+++ b/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
@@ -105,6 +105,9 @@ class AutocompleteTextfield : public views::Textfield {
}
virtual bool OnMouseDragged(const ui::MouseEvent& event) OVERRIDE {
+ // Do not change or select text by right button drag.
+ if (event.IsOnlyRightMouseButton())
+ return true;
bool result = views::Textfield::OnMouseDragged(event);
omnibox_view_->HandleMouseDragEvent(event);
return result;
« 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