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

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

Issue 10694140: Reverse OmniboxViewViews::HandleMouseReleaseEvent selection. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Copy comment from OmniboxViewWin::SelectAllIfNecessary. Created 8 years, 5 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 54999a5159b4d048de60d9837d33f6fa5bf7753a..9b810c5e145d773b477341b6fddb2d3209b54a84 100644
--- a/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
+++ b/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
@@ -397,7 +397,9 @@ void OmniboxViewViews::HandleMouseDragEvent(const views::MouseEvent& event) {
void OmniboxViewViews::HandleMouseReleaseEvent(const views::MouseEvent& event) {
if ((event.IsOnlyLeftMouseButton() || event.IsOnlyRightMouseButton()) &&
select_all_on_mouse_release_) {
- textfield_->SelectAll();
+ // Select all in the reverse direction so as not to scroll the caret
+ // into view and shift the contents jarringly.
+ SelectAll(true);
}
select_all_on_mouse_release_ = false;
}
« 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