Fix Hangul typing does not work properly

compositionstart event may fire in the meantime because
compositionend event is being processed asynchronously.

Signed-off-by: JungEon Kim <me@jungeon.kim>
pull/21833/head
JungEon Kim 2020-04-03 03:36:25 +09:00
parent 3ed457ea7d
commit 94236de637
1 changed files with 2 additions and 2 deletions

View File

@ -203,9 +203,9 @@ export default class BasicMessageEditor extends React.Component {
if (isSafari) { if (isSafari) {
this._onInput({inputType: "insertCompositionText"}); this._onInput({inputType: "insertCompositionText"});
} else { } else {
setTimeout(() => { Promise.resolve().then(() => {
this._onInput({inputType: "insertCompositionText"}); this._onInput({inputType: "insertCompositionText"});
}, 0); });
} }
} }