From dff2b040a0fc8c50e339ddc73a3b8bb29287134f Mon Sep 17 00:00:00 2001 From: "Sunil.Belakeri" Date: Tue, 7 Feb 2017 13:24:22 +0530 Subject: [PATCH] Fix for issues: https://github.com/futurepress/epub.js/issues/534 https://github.com/futurepress/epub.js/issues/528 --- src/managers/default/index.js | 5 +---- src/rendition.js | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/managers/default/index.js b/src/managers/default/index.js index 6c5d4a3..cdd64dd 100644 --- a/src/managers/default/index.js +++ b/src/managers/default/index.js @@ -282,15 +282,12 @@ class DefaultViewManager { this.scrollBy(this.layout.delta, 0); } else if (left - this.layout.columnWidth === this.container.scrollWidth) { this.scrollTo(this.container.scrollWidth - this.layout.delta, 0); + next = this.views.last().section.next(); } else { next = this.views.last().section.next(); } - - } else { - next = this.views.last().section.next(); - } if(next) { diff --git a/src/rendition.js b/src/rendition.js index 0214a81..2e51a71 100644 --- a/src/rendition.js +++ b/src/rendition.js @@ -243,7 +243,7 @@ class Rendition { // removing the chapter if(!isCfiString && typeof target === "string" && target.indexOf("#") > -1) { - moveTo = target.substring(target.indexOf("#")+1); + moveTo = target; } if (isCfiString) {