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

Fix keyboard chapter navigation for file urls. #915

Merged
merged 1 commit into from
May 7, 2019

Conversation

ehuss
Copy link
Contributor

@ehuss ehuss commented May 6, 2019

This fixes it so that keyboard navigation should work when loading a book from a file:// url.

When loading the search index, if it fails due to a CORS error (such as when loading json from file://), it will load the searchindex.js version instead here. However, this was written to replace the window.search object which loses the hasFocus method which caused the keyboard handler to fail because hasFocus was missing.

This changes it so that instead of replacing window.search, it just updates the existing object.

Fixes #910.

@Dylan-DPC-zz Dylan-DPC-zz merged commit 8bb5426 into rust-lang:master May 7, 2019
Ruin0x11 pushed a commit to Ruin0x11/mdBook that referenced this pull request Aug 30, 2020
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

Successfully merging this pull request may close these issues.

Prev/Next keyboard shortcuts not working properly
2 participants