| Index: ui/views/controls/textfield/textfield.cc
|
| diff --git a/ui/views/controls/textfield/textfield.cc b/ui/views/controls/textfield/textfield.cc
|
| index 5f3d119a53a85e892b1f57ba758f3001a42dfc17..88d4c1e334c9b1c05e8d4cbf7a416134b9a7ff1a 100644
|
| --- a/ui/views/controls/textfield/textfield.cc
|
| +++ b/ui/views/controls/textfield/textfield.cc
|
| @@ -230,6 +230,10 @@ base::string16 Textfield::GetPlaceholderText() const {
|
| return placeholder_text_;
|
| }
|
|
|
| +void Textfield::ShowImeIfNeeded() {
|
| + GetInputMethod()->ShowImeIfNeeded();
|
| +}
|
| +
|
| bool Textfield::IsIMEComposing() const {
|
| return model_->HasCompositionText();
|
| }
|
| @@ -463,8 +467,10 @@ bool Textfield::OnMousePressed(const ui::MouseEvent& event) {
|
| TrackMouseClicks(event);
|
|
|
| if (!controller_ || !controller_->HandleMouseEvent(this, event)) {
|
| - if (event.IsOnlyLeftMouseButton() || event.IsOnlyRightMouseButton())
|
| + if (event.IsOnlyLeftMouseButton() || event.IsOnlyRightMouseButton()) {
|
| RequestFocus();
|
| + ShowImeIfNeeded();
|
| + }
|
|
|
| if (event.IsOnlyLeftMouseButton()) {
|
| initiating_drag_ = false;
|
| @@ -634,6 +640,8 @@ void Textfield::OnGestureEvent(ui::GestureEvent* event) {
|
| case ui::ET_GESTURE_TAP_DOWN:
|
| OnBeforeUserAction();
|
| RequestFocus();
|
| + ShowImeIfNeeded();
|
| +
|
| // We don't deselect if the point is in the selection
|
| // because TAP_DOWN may turn into a LONG_PRESS.
|
| if (!GetRenderText()->IsPointInSelection(event->location()) &&
|
|
|