mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-20 06:01:24 +02:00
replace setTimeout (#1371)
This commit is contained in:
committed by
Ian Storm Taylor
parent
0afe15fa76
commit
816c981436
@@ -139,7 +139,7 @@ function BeforePlugin() {
|
|||||||
// The `count` check here ensures that if another composition starts
|
// The `count` check here ensures that if another composition starts
|
||||||
// before the timeout has closed out this one, we will abort unsetting the
|
// before the timeout has closed out this one, we will abort unsetting the
|
||||||
// `isComposing` flag, since a composition is still in affect.
|
// `isComposing` flag, since a composition is still in affect.
|
||||||
setTimeout(() => {
|
window.requestAnimationFrame(() => {
|
||||||
if (compositionCount > n) return
|
if (compositionCount > n) return
|
||||||
isComposing = false
|
isComposing = false
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user