Guidebook

Guidebook

6M Downloads

Incorrect "Home" button behavior

KorDum opened this issue ยท 4 comments

commented

Guidebook 2.6.5

<book title="Demo / Feature test book" cover="gbook:demo" fontSize="1">
    <include ref="gbook:xml/standard.xml" />
    <chapter>
        <page>
            <title>Chapter 1:1</title>
        </page>
        <page>
            <title>Chapter 1:2</title>
        </page>
    </chapter>
    <chapter>
        <page>
            <title>Chapter 2:1</title>
        </page>
        <page>
            <title>Chapter 2:2</title>
        </page>
    </chapter>
    <chapter>
        <page>
            <title>Chapter 3:1</title>
        </page>
        <page>
            <title>Chapter 3:2</title>
        </page>
    </chapter>
</book>

And two bugs:

  1. If I open book and click on "Home" button, I go to Chapter 2 instead Chapter 1.
  2. If I click on "Home" twice+, I need to press the same number of times to go back.
commented

I'm not sure what's causing the issue, but try giving your chapters and pages IDs and adding home="chapter1:page1" to your book element, but use your own IDs, of course. What happens now?

commented

Merged that PR, will make a bugfix release soon.

commented

Whoops, I figured it out. The default behavior for the home button is to go to the second page of the second chapter. I have submitted a pull request to fix it. Using the "home" attribute in the "book" element should still work, though.

commented

Guidebook v2.7.0 has been uploaded to curseforge and is awaiting review. It includes the fix for this issue, among other changes.