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.instant and announce.dismiss enabled
- Override the
main.html template'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
Context
Probably related to #3615
Bug description
Currently, if someone enables
navigation.instantandannounce.dismissat 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:mkdocs-material/src/assets/javascripts/integrations/instant/index.ts
Line 235 in f022873
When I removed this line in a custom theme, everything worked as expected (with the announcement staying dismissed).
Related links
Reproduction
.
Steps to reproduce
navigation.instantandannounce.dismissenabledmain.htmltemplate's{% block announce %}to have some contentBrowser
No response
Before submitting