Skip to content

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

@vedranmiletic

Description

@vedranmiletic

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssue reports a bugresolvedIssue is resolved, yet unreleased if open

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions