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

Back-to-top button stays visible when navigation tabs are sticky #3479

Closed
5 tasks done
mbelangergit opened this issue Jan 19, 2022 · 3 comments
Closed
5 tasks done

Back-to-top button stays visible when navigation tabs are sticky #3479

mbelangergit opened this issue Jan 19, 2022 · 3 comments
Labels
bug Issue reports a bug resolved Issue is resolved, yet unreleased if open

Comments

@mbelangergit
Copy link
Contributor

mbelangergit commented Jan 19, 2022

Contribution guidelines

I've found a bug and checked that ...

  • ... the problem doesn't occur with the mkdocs or readthedocs themes
  • ... the problem persists when all overrides are removed, i.e. custom_dir, extra_javascript and extra_css
  • ... the documentation does not mention anything about my problem
  • ... there are no open or closed issues that are related to my problem

Description

Little cosmetic issue:
When using navigation tabs and configuring them as sticky, if I scroll down a page and then either scroll back to top or use the back-to-top button, the back-to-top button stays visible.

I have tested without navigation.tabs.sticky and in this case, the button will disappear when clicking on it or scrolling back to top of the page.

Expected behaviour

I think the back-to-top button should disappear when the user gets back to the top of a page as when the sticky tabs are disabled.

Actual behaviour

image

Steps to reproduce

  1. Configure a site with navigation tabs and sticky tabs
  2. Scroll down a page
  3. Scroll up to show the back-to-top button
  4. Click the back-to-top button
  5. The button stays there.

Package versions

  • Python: 3.10.0
  • MkDocs: 1.2.3
  • Material: 8.1.7

Configuration

theme:
  features:
    - navigation.tabs
    - navigation.tabs.sticky
    - navigation.top

System information

  • Operating system: Window 10
  • Browser: Chrome 97.0.4692.71
@squidfunk
Copy link
Owner

Thanks for reporting. This is probably a regression in 8.1.7, which included a minor back-to-top button refactoring.

@squidfunk squidfunk added the bug Issue reports a bug label Jan 20, 2022
@squidfunk
Copy link
Owner

Fixed in 76d73b2.

@squidfunk squidfunk added the resolved Issue is resolved, yet unreleased if open label Jan 21, 2022
@squidfunk
Copy link
Owner

Released as part of 8.1.8

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

2 participants