We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent aa7966b commit 16931c2Copy full SHA for 16931c2
1 file changed
PDFViewerPlugin.js
@@ -85,6 +85,10 @@ function PDFViewerPlugin() {
85
pageHeight,
86
createdPageCount = 0;
87
88
+ function scrollIntoView(elem) {
89
+ elem.parentNode.scrollTop = elem.offsetTop;
90
+ }
91
+
92
function isScrolledIntoView(elem) {
93
var docViewTop = container.scrollTop,
94
docViewBottom = docViewTop + container.clientHeight,
@@ -311,6 +315,6 @@ function PDFViewerPlugin() {
311
315
};
312
316
313
317
this.showPage = function (n) {
314
- domPages[n - 1].scrollIntoView();
318
+ scrollIntoView(domPages[n - 1]);
319
320
}
0 commit comments