Skip to content

Commit 22e9d4f

Browse files
committed
Fix reentrancy issue in contenteditable selection updates
Fixes #6773
1 parent 7f35cf7 commit 22e9d4f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/input/ContentEditableInput.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ export default class ContentEditableInput {
226226
receivedFocus() {
227227
let input = this
228228
if (this.selectionInEditor())
229-
this.pollSelection()
229+
setTimeout(() => this.pollSelection(), 20)
230230
else
231231
runInOp(this.cm, () => input.cm.curOp.selectionChanged = true)
232232

0 commit comments

Comments
 (0)