Skip to content
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

Doesn’t seem to work for bookdown-generated pages #6

Open
ndarville opened this issue Aug 27, 2017 · 5 comments
Open

Doesn’t seem to work for bookdown-generated pages #6

ndarville opened this issue Aug 27, 2017 · 5 comments

Comments

@ndarville
Copy link

Example: http://r4ds.had.co.nz/index.html.

<link rel="next" href="introduction.html">

The site has been built with bookdown.

Any idea why it doesn’t go to the next page?

@kenaniah
Copy link
Owner

Thanks for the bug report!

The links are parsed properly, and the other shortcut keys work, so this may be something related to how scroll position is detected. I'm looking into it now.

@kenaniah
Copy link
Owner

Postmortem - bookdown uses a fixed height for <body> and wrapping <div>s that are scrollable. Checking the body's scroll position was therefore ineffective as the main content area lived inside of a child element.

Version 9.0 now uses checks the scroll positions of elements recursively starting from the target element when the spacebar is pressed, which allows for a better experience in fixed-height layouts.

@ndarville
Copy link
Author

Nice one, cheers. Should speed up my R studies significantly. :)

@ndarville
Copy link
Author

ndarville commented Aug 28, 2017

Uh-oh, @kenaniah, looks like this update breaks the feature on sites like https://forums.somethingawful.com now. :/

EDIT: What a terrible issue report, I meant to mention that it now skips to the next page whenever I press Space regardless where I am on the page.

kenaniah added a commit that referenced this issue Aug 31, 2017
This reverts commit dd9d899.
@kenaniah
Copy link
Owner

kenaniah commented Aug 31, 2017

Indeed. Apparently this patch breaks other websites such as Python docs. Reverting for now until I can find a more sustainable solution to this.

@kenaniah kenaniah reopened this Aug 31, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants