8000 Meta tags incorrectly removed when using navigation.instant in combination with system/dark/light palette · Issue #6846 · squidfunk/mkdocs-material · GitHub
[go: up one dir, main page]

Skip to content

Meta tags incorrectly removed when using navigation.instant in combination with system/dark/light palette #6846

@ThomasTNO

Description

@ThomasTNO

Context

No response

Bug description

On initial load the following meta tags are automatically added to <head>

<meta name="theme-color" content="some_value">
<meta name="color-scheme" content="some_other_value">

When navigation.instant is set in mkdocs.yml, unexpectedly these tags are removed when navigating the page and clicking on internal links. The removal of the tags result in the scrollbar colours switching back to browser default (e.g. light) instead of the expected (e.g. dark).

After some triaging it seems that they are removed in the inject()-function in

function inject(next: Document): Observable<Document> {

Related links

Reproduction

9.5.11-meta-tag-removal.zip

Steps to reproduce

  1. Load website
  2. Click a navigation link
  3. Toggle palette mode
  4. Observe that scrollbar no longer toggles based on palette
  5. Observe that meta tags are missing

Browser

No response

Before submitting

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssue reports a bugresolvedIssue is resolved, yet unreleased if open

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0