Index: content/browser/renderer_host/render_widget_host_view_aura.cc |
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc |
index edb16bd7d4038cae87acdbd8598bc84efbfa3da3..4a67b6025fdb8b0109c361a15756df89f395c5a3 100644 |
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc |
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc |
@@ -2981,6 +2981,12 @@ void RenderWidgetHostViewAura::OnUpdateTextInputStateCalled( |
last_active_widget->Send(new InputMsg_RequestCompositionUpdate( |
last_active_widget->GetRoutingID(), false /* immediate request */, |
true /* monitor request */)); |
+ if (has_composition_text_ && state->composition_start == -1) { |
aelias_OOO_until_Jul13
2016/09/26 21:25:59
Code in RenderWidgetHostViewAura only executes on
Changwan Ryu
2016/09/27 03:00:12
http://crbug.com/164427#c16
was the reason why it
aelias_OOO_until_Jul13
2016/09/27 04:39:47
OK, understood, but the history (including the lin
|
+ // JS-triggered change caused composition to be lost. |
+ // TODO(changwan): add a unit test. |
+ GetInputMethod()->CancelComposition(this); |
+ has_composition_text_ = false; |
+ } |
} else { |
// Stop monitoring the composition information if the focused node is not |
// editable. |