squidfunk/mkdocs-material

Mike version selector disappears if documentation header changes due to scrolling down

Closed this issue · 1 comments

Context

Not sure if this is expected behavior or a bug.

Bug description

When using mike and displaying the default version selector, the selector disappears when there is a longer document and the user scrolls down. This is happening because the document header changes as one is entering another section.

I would expect that the version selector stays regardless of the header change.

Related links

Reproduction

This is based on your version example, just added some dummy text to index.md so that the document gets longer.
9.5.42-sticky_version_selector.zip

Steps to reproduce

  1. Clone https://github.com/mkdocs-material/example-versioning
  2. Apply the changed index.md from the zip archive
  3. Deploy a new version locally mike deploy --update-aliases 0.5 latest
  4. Serve it locally mike serve
  5. Open version 0.5
  6. Make the browser window a little smaller and scroll down so that the header changes

Header when on top:
header_default

Header when scrolled down:
header_scrolled_down

Browser

No response

Before submitting

Thanks for reporting! This is actually by design, since the version selector is part of the changing header. We would need to move the version selector somewhere else otherwise, and I haven't found a good position other than the header.

Thus, we're closing this as working as intended.