Wrap range building in setTimeout (#22796)

GitOrigin-RevId: a0841e6eb9f2f637653dd0b8a37a61136097cc4f
This commit is contained in:
Alf Eaton
2025-01-16 09:05:31 +00:00
committed by Copybot
parent 4c0d0e3e61
commit 297324f3a2
@@ -98,7 +98,9 @@ export const RangesProvider: FC = ({ children }) => {
useEffect(() => {
if (currentDoc) {
const listener = () => {
setRanges(buildRanges(currentDoc))
window.setTimeout(() => {
setRanges(buildRanges(currentDoc))
})
}
// currentDoc.on('ranges:clear.cm6', listener)