diff --git a/dom/inputmethod/forms.js b/dom/inputmethod/forms.js index b9a33b32824e..089c9ba1e077 100644 --- a/dom/inputmethod/forms.js +++ b/dom/inputmethod/forms.js @@ -1277,14 +1277,7 @@ let CompositionManager = { if (!this._isStarted) { return; } - // Update the composing text. - let compositionString = domWindowUtils.createCompositionStringSynthesizer(); - compositionString.setString(text); - // Set the cursor position to |text.length| so that the text will be - // committed before the cursor position. - compositionString.setCaret(text.length, 0); - compositionString.dispatchEvent(); - domWindowUtils.sendCompositionEvent('compositionend', text, ''); + domWindowUtils.sendCompositionEvent('compositioncommit', text, ''); this._isStarted = false; },