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

[regression since 9.1.1] navigation.top doesn't work with navigation.instant #5176

Closed
4 tasks done
vedranmiletic opened this issue Mar 12, 2023 · 4 comments
Closed
4 tasks done
Labels
bug Issue reports a bug resolved Issue is resolved, yet unreleased if open

Comments

@vedranmiletic
Copy link
Contributor

Context

No response

Bug description

Navigation Back to top button doesn't work with instant loading enabled. The button appears normally, can be pressed normally (hover and pressing is correctly colored), but pressing it doesn't navigate you to the top of the page, the position on the page stays the same. Both Firefox and Chrome-based browsers (I have checked Brave on Linux and Chrome on Android) are affected.

I have additionally confirmed that there is no difference between pressing Back to top button on the initially loaded page and the first page loaded using instant loading (navigated using internal links). The position on the page stays the same in both cases.

This happens since version 9.1.1 and it might possibly be related to fixing #5023 via #5032. Version 9.1.0 works fine.

Related links

Reproduction

example.zip

Steps to reproduce

  1. Run mkdocs serve
  2. Open http://127.0.0.1:8000/ in browser
  3. Scroll down a bit
  4. Scroll up a bit less so Back to top button appears, but you are not at the top
  5. Press Back to top button

Browser

No response

Before submitting

@facelessuser
Copy link
Contributor

I can confirm this behavior and have seen it recently in my documents as well.

@squidfunk squidfunk added the bug Issue reports a bug label Mar 14, 2023
@squidfunk
Copy link
Owner

Thanks for reporting, confirmed, definitely a regression and related to the recent instant loading refactoring.

@squidfunk
Copy link
Owner

Fixed in 9752ad2. So, the back-to-top button implementation was kind of meh, so I rewrote it to an actual button instead of a link that sets the scroll position imperatively, since it's only shown when JavaScript is available anyway.

@squidfunk squidfunk added the resolved Issue is resolved, yet unreleased if open label Mar 14, 2023
@squidfunk
Copy link
Owner

Released as part of 9.1.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue reports a bug resolved Issue is resolved, yet unreleased if open
Projects
None yet
Development

No branches or pull requests

3 participants