From 310f7a7c608ae0328dbb62d1c3304adf45257c06 Mon Sep 17 00:00:00 2001 From: Miguel Serrano Date: Wed, 22 Apr 2020 11:57:14 +0200 Subject: [PATCH] Merge pull request #2741 from overleaf/hb-apply-please-scroll-pdf Force pdf viewer to check watches on clickable link GitOrigin-RevId: 364da514147751c4c1f69491a5070c94bf94aece --- services/web/frontend/js/ide/pdfng/directives/pdfViewer.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/services/web/frontend/js/ide/pdfng/directives/pdfViewer.js b/services/web/frontend/js/ide/pdfng/directives/pdfViewer.js index bb3f717090..a9eb1e6fb7 100644 --- a/services/web/frontend/js/ide/pdfng/directives/pdfViewer.js +++ b/services/web/frontend/js/ide/pdfng/directives/pdfViewer.js @@ -323,11 +323,12 @@ define([ this.setPdfPosition = function(page, position) { // console.log 'required pdf Position is', position return this.computeOffset(page, position).then(function(offset) { - $scope.pleaseScrollTo = offset - return ($scope.position = position) + return $scope.$apply(() => { + $scope.pleaseScrollTo = offset + $scope.position = position + }) }) } - return this })