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) {