Skip to content

Commit

Permalink
fix: Scroll adds white strip at bottom
Browse files Browse the repository at this point in the history
  • Loading branch information
gpalsingh committed Nov 14, 2024
1 parent 1c363ac commit 6a6ab2e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/react-pdf/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@commutatus/react-pdf",
"version": "8.0.65",
"version": "8.0.66",
"description": "Display PDFs in your React app as easily as if they were images.",
"type": "module",
"sideEffects": [
Expand Down
2 changes: 1 addition & 1 deletion packages/react-pdf/src/Document.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ class Viewer {

if (page) {
// Scroll to the page automatically
page.scrollIntoView();
page.scrollIntoView({ behavior: 'smooth', block: 'nearest', inline: 'nearest' });
this.currentPageNumber = pageNumber;
return;
}
Expand Down

0 comments on commit 6a6ab2e

Please sign in to comment.