mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-13 13:25:37 +00:00
Bug 1077345 part.8 CompositionManager.endComposition() in forms.js should use nsIDOMWindowUtils.sendCompositionEvent('compositioncommit') r=xyuan
This commit is contained in:
parent
9f491a5703
commit
fa0d074313
@ -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;
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user