Skip to content

Commit 785f20d

Browse files
committed
frontend/latex/sync: remove a sync timeout
1 parent bd451d1 commit 785f20d

File tree

1 file changed

+2
-5
lines changed
  • src/packages/frontend/frame-editors/latex-editor

1 file changed

+2
-5
lines changed

src/packages/frontend/frame-editors/latex-editor/output.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -369,11 +369,8 @@ export function Output(props: OutputProps) {
369369
const autoSyncInProgress =
370370
actions.store.get("autoSyncInProgress");
371371
if (autoSyncInProgress) {
372-
// Debounce the flag clearing to avoid clearing too early during scrolling
373-
clearTimeout((window as any).__autoSyncClearTimeout);
374-
(window as any).__autoSyncClearTimeout = setTimeout(() => {
375-
actions.setState({ autoSyncInProgress: false });
376-
}, 500); // Wait longer to ensure scrolling has stabilized
372+
// Clear immediately to allow next forward sync without delay
373+
actions.setState({ autoSyncInProgress: false });
377374
}
378375
}}
379376
onPageDimensions={setPageDimensions}

0 commit comments

Comments
 (0)