Index: ui/views/controls/textfield/textfield.cc |
diff --git a/ui/views/controls/textfield/textfield.cc b/ui/views/controls/textfield/textfield.cc |
index dc0a9f2535810941f1720d9e131d0061120ed26d..0de58f5f976c5574e6cecf19a52d6f2d69d247b1 100644 |
--- a/ui/views/controls/textfield/textfield.cc |
+++ b/ui/views/controls/textfield/textfield.cc |
@@ -46,6 +46,7 @@ |
#if defined(OS_WIN) |
#include "base/win/win_util.h" |
+#include "ui/base/win/osk_display_manager.h" |
#endif |
#if defined(OS_LINUX) && !defined(OS_CHROMEOS) |
@@ -768,8 +769,11 @@ void Textfield::OnGestureEvent(ui::GestureEvent* event) { |
} |
CreateTouchSelectionControllerAndNotifyIt(); |
#if defined(OS_WIN) |
- if (!read_only()) |
- base::win::DisplayVirtualKeyboard(); |
+ if (!read_only()) { |
+ DCHECK(ui::OnScreenKeyboardDisplayManager::GetInstance()); |
+ ui::OnScreenKeyboardDisplayManager::GetInstance() |
+ ->DisplayVirtualKeyboard(nullptr); |
+ } |
#endif |
event->SetHandled(); |
break; |