diff --git a/services/web/frontend/js/features/pdf-preview/components/pdf-synctex-controls.js b/services/web/frontend/js/features/pdf-preview/components/pdf-synctex-controls.js index 3a17481554..7e56f04dff 100644 --- a/services/web/frontend/js/features/pdf-preview/components/pdf-synctex-controls.js +++ b/services/web/frontend/js/features/pdf-preview/components/pdf-synctex-controls.js @@ -109,8 +109,14 @@ function PdfSynctexControls() { const { detachRole } = useLayoutContext() - const { clsiServerId, pdfUrl, pdfViewer, position, setHighlights } = - useCompileContext() + const { + clsiServerId, + pdfUrl, + pdfViewer, + position, + setShowLogs, + setHighlights, + } = useCompileContext() const [cursorPosition, setCursorPosition] = useState(() => { const position = localStorage.getItem( @@ -206,6 +212,7 @@ function PdfSynctexControls() { getJSON(`/project/${projectId}/sync/code?${params}`, { signal }) .then(data => { + setShowLogs(false) setHighlights(data.pdf) }) .catch(error => { @@ -221,6 +228,7 @@ function PdfSynctexControls() { clsiServerId, isMounted, projectId, + setShowLogs, setHighlights, setSyncToPdfInFlight, signal,