From e6b8a14e3463ba65a4dac9f1fcfa6323084904d4 Mon Sep 17 00:00:00 2001
From: bobzel <zzzman@gmail.com>
Date: Wed, 7 Oct 2020 15:02:16 -0400
Subject: fixed following links to set the scollTop of PDFs corretion.  Fixed
 following links to rich text anchors to scroll and highlight properly.  
 fixed pushpin behavior to only toggle off when the target is in sight.

---
 src/client/views/pdf/PDFViewer.tsx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'src/client/views/pdf/PDFViewer.tsx')

diff --git a/src/client/views/pdf/PDFViewer.tsx b/src/client/views/pdf/PDFViewer.tsx
index 3570c565a..606d3e550 100644
--- a/src/client/views/pdf/PDFViewer.tsx
+++ b/src/client/views/pdf/PDFViewer.tsx
@@ -184,7 +184,7 @@ export class PDFViewer extends ViewBoxAnnotatableComponent<IViewerProps, PdfDocu
                     } else if (!LinkDocPreview.TargetDoc && !FormattedTextBoxComment.linkDoc) { // wait for mainCont and try again to scroll
                         setTimeout(() => this._mainCont.current && smoothScroll(1000, this._mainCont.current, scrollY || 0), 250);
                     }
-                    setTimeout(() => this.Document._scrollY = undefined, 1000);
+                    setTimeout(() => { this.Document._scrollTop = scrollY; this.Document._scrollY = undefined; }, 1000);
                 }
             },
             { fireImmediately: true }
-- 
cgit v1.2.3-70-g09d2

