From 4fa6be7cee26076a2559c5aaa2b8bebefcb855fb Mon Sep 17 00:00:00 2001 From: Chinmay Garde Date: Tue, 8 May 2018 16:20:42 -0700 Subject: [PATCH] Fix channel encoding errors on the IME client. (#5209) --- content_handler/platform_view.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/content_handler/platform_view.cc b/content_handler/platform_view.cc index 611c74f8c..e62f9e44a 100644 --- a/content_handler/platform_view.cc +++ b/content_handler/platform_view.cc @@ -507,10 +507,12 @@ void PlatformView::HandleFlutterTextInputChannelPlatformMessage( // TODO(abarth): Read the keyboard type from the configuration. current_text_input_client_ = args->value[0].GetInt(); + auto initial_text_input_state = input::TextInputState{}; + initial_text_input_state.text = ""; input_connection_->GetInputMethodEditor( input::KeyboardType::TEXT, // keyboard type input::InputMethodAction::DONE, // input method action - input::TextInputState{}, // initial state + initial_text_input_state, // initial state ime_client_.NewBinding(), // client ime_.NewRequest() // editor ); @@ -522,6 +524,7 @@ void PlatformView::HandleFlutterTextInputChannelPlatformMessage( } const auto& args = args_it->value; input::TextInputState state; + state.text = ""; // TODO(abarth): Deserialize state. auto text = args.FindMember("text"); if (text != args.MemberEnd() && text->value.IsString())