-
Notifications
You must be signed in to change notification settings - Fork 132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clicking sidebar toggle returns page to top. #5
Comments
Hmm. I can't reproduce it here. Getting the ToC of the long text could be achieved by putting in a liquid for loop (or manually) on the sidebar.html in _includes. But this would be assuming that you want the whole site to show that in the sidebar. To do page specific ToC on the sidebar, would require a bit of javascript and deeper tweaking of sidebar.html. Be happy to take a pull request if you think this is a feature many people will like. |
@c-forster, could you tell me what your conditions are? Is this Chrome? How long is the text? |
So, if I go to the fifth chapter of The Narrative of the Life of Frederick Douglas, and then toggle the sidebar, I lose my place (the page jumps to the top). This is on both Chrome (47.0.2526.80) and Firefox (41.0.1) on OS X 10.10.05. I did a little more digging and this behavior has been reported as an issue on the lanyon page: poole/lanyon#137 That issue features a fix that appears to work, though I haven't been able to test it thoroughly to make sure it doesn't break something else (I'd be particularly worried about mobile). I'm not sure why there hasn't been a fix/PR on Lanyon. I'll submit a pull request here that would use the simple fix described there; but be wary of accepting it without testing on mobile to make sure. |
Fixes issue #5, page jumping to top when sidebar toggled.
On a long text, clicking the sidebar toggle jumps the page back to the top and loses your place. (For a long text, with a table of contents, I was interested to see if the ToC would appear int he sidebar.)
The text was updated successfully, but these errors were encountered: