Commit 2820bbca authored by shuchen's avatar shuchen Committed by Commit bot

The preedit view of the candidate window should be hidden correctly when the...

The preedit view of the candidate window should be hidden correctly when the text input client doesn't support inline composing.

BUG=612642

Review-Url: https://codereview.chromium.org/2290083002
Cr-Commit-Position: refs/heads/master@{#415225}
parent 77b0dcbf
......@@ -96,6 +96,8 @@ void CandidateWindowControllerImpl::SetCursorBounds(
void CandidateWindowControllerImpl::FocusStateChanged(bool is_focused) {
mode_indicator_controller_->FocusStateChanged(is_focused);
if (candidate_window_view_)
candidate_window_view_->HidePreeditText();
}
void CandidateWindowControllerImpl::UpdateLookupTable(
......
......@@ -457,6 +457,11 @@ void InputMethodChromeOS::CommitText(const std::string& text) {
if (utf16_text.empty())
return;
if (!CanComposeInline()) {
// Hides the candidate window for preedit text.
UpdateCompositionText(CompositionText(), 0, false);
}
// Append the text to the buffer, because commit signal might be fired
// multiple times when processing a key event.
result_text_.append(utf16_text);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment