mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Wrap setCursorHighlights in setTimeout (#12951)
GitOrigin-RevId: 204bf073bc2f4a014d9498c6a802fe38e52b22c5
This commit is contained in:
parent
0fba9dc374
commit
009a108c71
1 changed files with 3 additions and 1 deletions
|
@ -436,7 +436,9 @@ function useCodeMirrorScope(view: EditorView) {
|
|||
if (cursorHighlights && currentDoc) {
|
||||
const items = cursorHighlights[currentDoc.doc_id]
|
||||
highlightsRef.current.cursorHighlights = items
|
||||
view.dispatch(setCursorHighlights(items))
|
||||
window.setTimeout(() => {
|
||||
view.dispatch(setCursorHighlights(items))
|
||||
})
|
||||
}
|
||||
}, [view, cursorHighlights, currentDoc])
|
||||
|
||||
|
|
Loading…
Reference in a new issue