diff --git a/packages/slate-react/src/plugins/before.js b/packages/slate-react/src/plugins/before.js index ffc37a171..aef4cd804 100644 --- a/packages/slate-react/src/plugins/before.js +++ b/packages/slate-react/src/plugins/before.js @@ -139,7 +139,7 @@ function BeforePlugin() { // The `count` check here ensures that if another composition starts // before the timeout has closed out this one, we will abort unsetting the // `isComposing` flag, since a composition is still in affect. - setTimeout(() => { + window.requestAnimationFrame(() => { if (compositionCount > n) return isComposing = false