Fix page changes via click/hotkey in horizontal pager
Due to the way the pages got scrolled into view, the current page was not changed to the new page. This then prevented the previous/next page to get opened via click/hotkey actions
This commit is contained in:
@@ -302,7 +302,7 @@ export class ReaderControls {
|
||||
return;
|
||||
}
|
||||
|
||||
const hasPageIndexChanged = pageIndex !== currentPageIndex;
|
||||
const hasPageIndexChanged = endReached || pageIndex !== currentPageIndex;
|
||||
if (!hasPageIndexChanged) {
|
||||
return;
|
||||
}
|
||||
@@ -353,7 +353,7 @@ export class ReaderControls {
|
||||
|
||||
// handle cases where the last page is too small to ever be the "firstVisibleImageIndex"
|
||||
if (isEndReached) {
|
||||
updateCurrentPageIndex(lastPageIndex, false);
|
||||
updateCurrentPageIndex(firstVisibleImageIndex, false, true);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user