question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Current tab detection breaks if the section has only subsections

See original GitHub issue

I’ve found a bug and checked that …

  • … the problem doesn’t occur with the default MkDocs template
  • … the problem is not in any of my customizations (CSS, JS, template)
  • … the documentation does not mention anything about my problem
  • … there are no open or closed issues that are related to my problem

Description

If tabbed navigation is enabled and a tab’s nav items include only subsections, not any pages, then the tab may not be detected as active.

Expected behavior

The current tab is highlighted (which it is in this case, but only for the first subsection)

image

Actual behavior

Selecting any item under the 2nd section onwards makes the tab not highlighted anymore

image

Steps to reproduce the bug

mkdir -p docs/taba docs/taba/bar docs/taba/foo docs/tabb
touch docs/taba/bar/bar.md docs/taba/bar/barr.md docs/taba/foo/foo.md docs/taba/foo/fooo.md docs/tabb/b.md                                                                                    
cat >mkdocs.yml

Package versions

Project configuration

site_name: Hmm
theme:
  name: material
  features:
    - navigation.tabs

System information

  • Browser: Firefox and Chromium

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
oprypincommented, Dec 21, 2020

This is indeed fixed, thanks. I would close this issue but not sure if that’s the process that you’re following.

1reaction
squidfunkcommented, Dec 13, 2020

This issue has been resolved as part of #2072. As https://github.com/squidfunk/mkdocs-material/issues/2072#issuecomment-744011149 explains, the bugfix will be released with the hit of the next Insiders funding goal. This is an exception to the usual policy of providing bugfixes for both editions, due to the fact that navigation has undergone a big refactoring. As I’d consider this to be a minor bug (i.e. wrong link color), it doesn’t justify the effort of backporting the fix. I hope for your understanding - it shouldn’t take more than a few weeks after all.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Show section breaks - Microsoft Support
When you've added section breaks in your document, the easiest way to see where they begin and end is to first display all...
Read more >
Hazard Communication Standard: Safety Data Sheets
This section identifies the hazards of the chemical presented on the SDS and the appropriate warning information associated with those hazards. The required ......
Read more >
The Uniform CPA Exam - CalCPA
CalCPA has developed this brochure to inform candidates about the general format and administration of the Uniform. CPA Exam. Certain information.
Read more >
Handling common accessibility problems - MDN Web Docs
Hopefully this article has given you a good grounding in the main accessibility problems you might encounter, and how to test and overcome ......
Read more >
DEFINITION OF ENTRIES - UCSB Office of the Registrar
When any primary section has secondary sections, such as discussions or labs, ... If the course approval states optional grading, any section of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found