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

"Home" title using "navigation.instant" feature #4924

Closed
4 tasks done
Belface opened this issue Jan 27, 2023 · 5 comments
Closed
4 tasks done

"Home" title using "navigation.instant" feature #4924

Belface opened this issue Jan 27, 2023 · 5 comments
Labels
bug Issue reports a bug resolved Issue is resolved, yet unreleased if open

Comments

@Belface
Copy link

Belface commented Jan 27, 2023

Context

No response

Bug description

Hello
when I navigate back to the index page of my website, my title in the top left corner of the page (div class="md-header__title") is changed into "Home" label. If I remove "navigation.instant" feature from mkdocs.yml, the issue disappears.

Related links

Reproduction

example.zip

Steps to reproduce

  1. Display the index page --> Title = site_name (from mkdocs.yml) --> OK
  2. Display a page from navigation menu --> Title = site_name --> OK
  3. Scroll on this page --> Title = name of the page (also from mkdocs.yml/nav:) --> OK
  4. Click the logo on left top of page (without scrolling back to top)
  5. The index page is displaying --> Title = "Home" --> NOK

If I replace the last 2 steps by :
4. Scrolling back to top --> Title = site_name (from mkdocs.yml) --> OK
5. Click the logo, the index page is displaying --> site_name (from mkdocs.yml) --> OK

Browser

Firefox

Before submitting

@squidfunk
Copy link
Owner

Thanks for reporting. However, this issue is incomplete. We need a reproduction. Please follow the reproduction guide, it's actually super easy to create one, but helps us maintainers save a lot of time, providing bugfixes much quicker.

Closing as incomplete. We'll reopen when this issue has a reproduction.

@squidfunk squidfunk added the needs reproduction Issue lacks a minimal reproduction .zip file label Jan 27, 2023
@Belface
Copy link
Author

Belface commented Jan 30, 2023

Hello Martin,
I've updated the post by adding the reproduction file.
I noticed that when I add a first tree tag in the index.md (#Test for example), the issue disappear

@squidfunk squidfunk added needs investigation Issue must be investigated by the maintainers and removed needs reproduction Issue lacks a minimal reproduction .zip file labels Feb 7, 2023
@squidfunk squidfunk reopened this Feb 7, 2023
@squidfunk
Copy link
Owner

Thanks for the excellent reproduction – that made observing and fixing the problem straight forward! The reason was that the header title state was not reset when navigating, and when the document contains no headline, it stayed in the state it was in before. Fixed in ff99e19 by resetting the title state on navigation.

@squidfunk squidfunk added bug Issue reports a bug resolved Issue is resolved, yet unreleased if open and removed needs investigation Issue must be investigated by the maintainers labels Feb 9, 2023
@squidfunk
Copy link
Owner

Released as part of 9.0.12.

@Belface
Copy link
Author

Belface commented Feb 10, 2023

Thanks Martin
Good job !

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