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

Default theme: N and P keys no longer work #3728

Closed
nandoflorestan opened this issue Jun 10, 2024 · 7 comments · Fixed by #3730 · May be fixed by #3729
Closed

Default theme: N and P keys no longer work #3728

nandoflorestan opened this issue Jun 10, 2024 · 7 comments · Fixed by #3730 · May be fixed by #3729
Labels
Bug Theme-mkdocs Issues specifically involving the mkdocs theme.

Comments

@nandoflorestan
Copy link

Using mkdocs 1.6.0, the default theme is much better than the one in 1.5.x. It has dark mode, awesome!

If you press ? it displays a few keyboard shortcuts.

But if you press the N key to go to the next page, or the P key to go to the previous page, nothing happens, and you get this error in the console:

Uncaught DOMException: Document.querySelector: '.navbar a[rel="next"]:first' is not a valid selector
http://127.0.0.1:8000/js/base.js:60

@pawamoy
Copy link
Sponsor Contributor

pawamoy commented Jun 10, 2024

Sounds like it comes from the move from JQuery to vanilla Javascript. Tagging @squidfunk.

@pawamoy pawamoy added Bug Theme-mkdocs Issues specifically involving the mkdocs theme. labels Jun 10, 2024
@squidfunk
Copy link
Sponsor Contributor

Fix in #3729. Also note that #3694 has not been released yet.

@squidfunk
Copy link
Sponsor Contributor

squidfunk commented Jun 10, 2024

Another problem: When you click on the "User guide" and "Developer guide" tabs, an error is triggered in the console. Fixed in #3730. Note that we normally would use optional chaining, but I'm not sure which browsers MkDocs wants to support, so I'm going for a good ol' conditional branch.

@nandoflorestan
Copy link
Author

I am impressed by how quickly a solution was presented. Thank you! Hoping for a point release of mkdocs soon.

@squidfunk
Copy link
Sponsor Contributor

Yes, a release would be great! Looking at the changeset, it looks like a patch release would follow semantic versioning, except maybe for changing the output of sitemap.xml, but changefreq is a no-op for search engines anyway. Thus, 1.6.1 should be good to go, even after merging #3729 and #3730, as no change adds new or breaks existing behavior ☺️

Let's hope the maintainers also see it that way ☺️

@squidfunk
Copy link
Sponsor Contributor

@tomchristie friendly ping ☺️ would be great to have those fixes released 🚀

@squidfunk
Copy link
Sponsor Contributor

Thanks! However, as I mentioned in #3728 (comment), #3730 was only bycatch, so this issue, IMHO, cannot be considered resolved and should be reopened, since the corresponding fix was not merged yet. The relevant PR is #3729.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Theme-mkdocs Issues specifically involving the mkdocs theme.
Projects
None yet
3 participants