Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(490)

Unified Diff: ui/views/ime/input_method_bridge.cc

Issue 21874003: Fixes twice-IME-committement on blur. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/ime/input_method_bridge.cc
diff --git a/ui/views/ime/input_method_bridge.cc b/ui/views/ime/input_method_bridge.cc
index 3d9a4587181d00db03d3eafb2c1283f644fa9790..34f6e1b469ce0ff8a7333bb9b55ce0cc8aa6b41d 100644
--- a/ui/views/ime/input_method_bridge.cc
+++ b/ui/views/ime/input_method_bridge.cc
@@ -45,7 +45,10 @@ void InputMethodBridge::OnFocus() {
}
void InputMethodBridge::OnBlur() {
- ConfirmCompositionText();
+ if (HasCompositionText()) {
+ ConfirmCompositionText();
+ host_->CancelComposition(this);
+ }
if (host_->GetTextInputClient() == this)
host_->SetFocusedTextInputClient(NULL);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698