Skip to content

Commit

Permalink
EPUB: Fix Previous Page working on first page
Browse files Browse the repository at this point in the history
  • Loading branch information
AbeJellinek committed Aug 28, 2024
1 parent f64ad24 commit 1085fdb
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/dom/epub/flow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,9 @@ export class PaginatedFlow extends AbstractFlow {
}

navigateToPreviousPage(): void {
if (!this.canNavigateToPreviousPage()) {
return;
}
if (this.atStartOfSection()) {
this.navigateToPreviousSection();
this._sectionsContainer.scrollTo({ left: this._sectionsContainer.scrollWidth, top: 0 });
Expand All @@ -507,6 +510,9 @@ export class PaginatedFlow extends AbstractFlow {
}

navigateToNextPage(): void {
if (!this.canNavigateToNextPage()) {
return;
}
if (this.atEndOfSection()) {
this.navigateToNextSection();
return;
Expand Down

0 comments on commit 1085fdb

Please sign in to comment.