Bug 1302980 - Don't reset IME context on preedit_end. r?masayuki
You know, when Korean IME commits string, then it sometimes set next preedit string. So reseting context causes that next preedit string is committed.
So we shouldn't reset IME context with preedit_end.
MozReview-Commit-ID: CZJJvYjcrKY
--- a/widget/gtk/IMContextWrapper.cpp
+++ b/widget/gtk/IMContextWrapper.cpp
@@ -995,17 +995,18 @@ IMContextWrapper::OnSelectionChange(nsWi
// If the selection change is caused by deleting surrounding text,
// we shouldn't need to notify IME of selection change.
if (mIsDeletingSurrounding) {
return;
}
bool occurredBeforeComposition =
- IsComposing() && !selectionChangeData.mOccurredDuringComposition;
+ IsComposing() && !selectionChangeData.mOccurredDuringComposition &&
+ !selectionChangeData.mCausedByComposition;
if (occurredBeforeComposition) {
mPendingResettingIMContext = true;
}
// When the selection change is caused by dispatching composition event,
// selection set event and/or occurred before starting current composition,
// we shouldn't notify IME of that and commit existing composition.
if (!selectionChangeData.mCausedByComposition &&