mkdocs-material: Left nav breaks in Safari

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

  • Left nav disappears and/or freezes up on macOS Safari
  • Doesn’t happen in Chrome

Expected behaviour

Left nav works as normal.

Actual behaviour

Left nav sometimes disappears and/or freezes up.

Steps to reproduce

  1. Create a site using the mkdocs.yml provided below
  2. mkdocs serve
  3. Use the site in Safari, clicking around in the left nav

See video, here:

https://user-images.githubusercontent.com/6285/147708059-4ce71905-8798-4fc8-a951-3660d5016c82.mov

Package versions

  • Python 3.8.2
  • mkdocs, version 1.2.3
  • Material: Version: 8.1.3+insiders.4.5.0

Configuration

# Project information
site_name: Animals

# Configuration
theme:
  name: material

nav:
  - Wildlife: wildlife.md
  - Animals:
    - Land:
      - Land Animals: animals/land/index.md
    - Sea:
      - Sea Animals: animals/sea/index.md

System information

  • Operating system: macOS Monterey, Version 12.0.1
  • Browser: Safari, Version 15.1

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 16 (8 by maintainers)

Most upvoted comments

Perfect, thanks! New fix is even better as it doesn’t push every navigation item on a new layer.

Just did a quick test, seems fine! Will let you know if I see it pop back up. Thanks, @squidfunk.

It’s not yet released, as I wanted to check if it’s fixed first. On a side note: there’s no possibility to install “latest release” via pip when installing from git – you can only install specific tags or master 😕

I think I have a fix in 8233849. It’s a hack to promote the navigation link title to its own layer, but that seems to mitigate the issue at hand. I could only test in Safari 14, so it would be great if you could check the latest master again 😊