Incorrect "Home" button behavior
KorDum opened this issue ยท 4 comments
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:
- If I open book and click on "Home" button, I go to Chapter 2 instead Chapter 1.
- If I click on "Home" twice+, I need to press the same number of times to go back.
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?
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.