diff --git a/dom/events/IMEStateManager.cpp b/dom/events/IMEStateManager.cpp index 71d7b7a62b1..34a06d06fb6 100644 --- a/dom/events/IMEStateManager.cpp +++ b/dom/events/IMEStateManager.cpp @@ -146,6 +146,8 @@ GetEventMessageName(uint32_t aMessage) return "NS_COMPOSITION_CHANGE"; case NS_COMPOSITION_COMMIT_AS_IS: return "NS_COMPOSITION_COMMIT_AS_IS"; + case NS_COMPOSITION_COMMIT: + return "NS_COMPOSITION_COMMIT"; default: return "unacceptable event message"; } diff --git a/editor/libeditor/nsHTMLEditor.cpp b/editor/libeditor/nsHTMLEditor.cpp index 06a842b6dc0..ff77dcc5d7a 100644 --- a/editor/libeditor/nsHTMLEditor.cpp +++ b/editor/libeditor/nsHTMLEditor.cpp @@ -5211,6 +5211,13 @@ nsHTMLEditor::IsAcceptableInputEvent(nsIDOMEvent* aEvent) return false; } + // While there is composition, all composition events in its top level window + // are always fired on the composing editor. Therefore, if this editor has + // composition, the composition events should be handled in this editor. + if (mComposition && aEvent->GetInternalNSEvent()->AsCompositionEvent()) { + return true; + } + NS_ENSURE_TRUE(mDocWeak, false); nsCOMPtr target;