Bug 1234120 part.3 IMMHandler should forget caret position specified by IME when IMMHandler doesn't set caret range to eCompositionChange event r=m_kato

This commit is contained in:
Masayuki Nakano 2015-12-22 14:58:48 +09:00
parent d586464951
commit 5baf692654

View File

@ -2031,8 +2031,12 @@ IMMHandler::CreateTextRangeArray()
if (targetClause &&
cursor >= targetClause->mStartOffset &&
cursor <= targetClause->mEndOffset) {
// Forget the caret position specified by IME since Gecko's caret position
// will be at the end of composition string.
mCursorPosition = NO_IME_CARET;
MOZ_LOG(gIMMLog, LogLevel::Info,
("IMM: CreateTextRangeArray, no caret due to it's in the target clause"));
("IMM: CreateTextRangeArray, no caret due to it's in the target clause, "
"now, mCursorPosition is NO_IME_CARET"));
return textRangeArray.forget();
}