diff options
author | msw@chromium.org <msw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-12 20:53:19 +0000 |
---|---|---|
committer | msw@chromium.org <msw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-12 20:53:19 +0000 |
commit | b551fa2336b9b9bb2514ae159c75c49cf009e33d (patch) | |
tree | caa803df4e45ba0f66357d170561c9d2a170962e /ui/views/controls/textfield | |
parent | 3a01162bc4f385c6353a603662721eb95530b526 (diff) | |
download | chromium_src-b551fa2336b9b9bb2514ae159c75c49cf009e33d.zip chromium_src-b551fa2336b9b9bb2514ae159c75c49cf009e33d.tar.gz chromium_src-b551fa2336b9b9bb2514ae159c75c49cf009e33d.tar.bz2 |
Fix views omnibox unfocused double-click behavior.
Move the cursor to the double-click event location before selecting the surrounding word.
This fixes double-click behavior when the views omnibox is unfocused.
( unfocused mouse-up on the first click selects all, changing the cursor position )
BUG=131660,165873
TEST=double-clicking the unfocused omnibox selects the expected word.
R=sky@chromium.org
Review URL: https://chromiumcodereview.appspot.com/12408023
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@187643 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/views/controls/textfield')
-rw-r--r-- | ui/views/controls/textfield/native_textfield_views.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/ui/views/controls/textfield/native_textfield_views.cc b/ui/views/controls/textfield/native_textfield_views.cc index ebd13ac..ecfc28c 100644 --- a/ui/views/controls/textfield/native_textfield_views.cc +++ b/ui/views/controls/textfield/native_textfield_views.cc @@ -1346,6 +1346,7 @@ void NativeTextfieldViews::HandleMousePressEvent(const ui::MouseEvent& event) { MoveCursorTo(event.location(), event.IsShiftDown()); break; case 1: + MoveCursorTo(event.location(), false); model_->SelectWord(); OnCaretBoundsChanged(); break; |