mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-19 13:41:19 +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
|
||||
// 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
|
||||
|
||||
|
Reference in New Issue
Block a user