If a link at the bottom of a very tall page links to another very tall page, the screen won't scroll back to the top of the 2nd page when clicking the link.
How to reproduce:
1) Create a very tall page with enough line breaks so that it's tall enough to be higher than your screen height.
2) Put a link at the bottom of that page that links to a second page.
3) Edit the 2nd page so that it is also very tall (taller than your screen)
4) Play from the 1st page
5) Click the link at the bottom of the page
Result:
When the 2nd page is displayed, the page doesn't scroll back to the top. This can cause the reader to miss the text above.
See the attached file for an example.
Comments
I tried to put some javascript in my passage that would scroll to the top of the page: ...but that doesn't work. It just print all that code into my story, like it's regular text.
Maybe I could put something in the "Edit Story Javascript" window? How would I catch the event "passage is loaded"?
Actually, how do I write code into the Edit Story Javascript window? I tried to put simple stuff like "console.log("lorem ipsum") or "alert("toto");" but it doesn't do anything.
It is not a straight forward process and relies on the user knowing a little about what they are doing but it starts with downloading the latest version of Harlowe from here.
Back to my original problem, how could I make the page scroll back to the top after each passage is loaded? Right now, this prevents me from releasing my story, because my players simply don't see that there's text above, and they miss half the text.
I tried to write javascript code in the passages themselves, but the code doesn't seem to be executed. Is it also related to the bug where the Javascript special passage is not executed?
In Edit Story Javascript, copy this: This code will make so that every click on the page will scroll the page back to the top, which means that when the player clicks on a link, the page will be at the top for when the next passage is displayed. I didn't know how to detect only clicks on links, so that's why it detects all clicks, even if the player clicks on nothing. Like I said, it's a dirty fix.
Edit: Not required anymore
Also, since the javascript in the special javascript passage is currently not executed in Harlowe because of a bug, you have to manually edit the exported HTML source file and add this code before the </body> tag (it's at the very bottom of the page):
We have to thanks our friend greyelf for that one. His full message and instructions are here: http://twinery.org/forum/index.php/topic,2132.msg6198.html#msg6198
So yeah... That's a bit complicated, but hopefully all of this will be fixed in the next Twine update and the next Harlowe update. In the meantime, I can now FINALLY release my story, so I'm very happy!