-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Closed
Labels
bugIssue reports a bugIssue reports a bugresolvedIssue is resolved, yet unreleased if openIssue is resolved, yet unreleased if open
Description
Context
Probably related to #3615
Bug description
Currently, if someone enables navigation.instant and announce.dismiss at the same time, the announcement will only stay dismissed until the next page navigation, after which it will reappear again.
The cause is fairly straightforward, it is simply that [data-md-component=announce] should not be selected in the instant reload typescript:
| "[data-md-component=announce]", |
When I removed this line in a custom theme, everything worked as expected (with the announcement staying dismissed).
Related links
Reproduction
.
Steps to reproduce
- Create a MkDocs material website with
navigation.instantandannounce.dismissenabled - Override the
main.htmltemplate's{% block announce %}to have some content - Load the website, and dismiss the announcement bar
- Navigate to a new page on the website (without reloading)
- The announcement bar will reappear
Browser
No response
Before submitting
- I have read and followed the bug reporting guidelines.
- I have attached links to the documentation, and possibly related issues and discussions.
- I assure that I have removed all customizations before submitting this bug report.
- I have attached a .zip file with a minimal reproduction.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugIssue reports a bugIssue reports a bugresolvedIssue is resolved, yet unreleased if openIssue is resolved, yet unreleased if open