Merge pull request #19791 from overleaf/jpa-enable-synctex-test

[server-ce] tests: re-enable test for sync to pdf

GitOrigin-RevId: fd111ba1ff846acfe82735b4bc47f68929266254
This commit is contained in:
Jakob Ackermann
2024-08-07 08:04:37 +00:00
committed by Copybot
parent 051089d466
commit eede7fe313
3 changed files with 21 additions and 29 deletions
@@ -341,7 +341,7 @@ function PdfJsViewer({ url, pdfFile }: PdfJsViewerProps) {
timers.push(
window.setTimeout(() => {
element.style.opacity = '0'
}, 1000)
}, 1100)
)
}
}
@@ -367,11 +367,16 @@ function PdfJsViewer({ url, pdfFile }: PdfJsViewerProps) {
if (firstElement) {
// scroll to the first highlighted element
firstElement.scrollIntoView({
block: 'center',
inline: 'start',
behavior: 'smooth',
})
// Briefly delay the scrolling after adding the element to the DOM.
timers.push(
window.setTimeout(() => {
firstElement.scrollIntoView({
block: 'center',
inline: 'start',
behavior: 'smooth',
})
}, 100)
)
}
return () => {