mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-11-30 18:24:35 +01:00
Fixed search not closing after navigation
This commit is contained in:
parent
ece3253d4f
commit
f27eb1ee07
File diff suppressed because one or more lines are too long
7
material/assets/javascripts/bundle.926459b3.min.js.map
Normal file
7
material/assets/javascripts/bundle.926459b3.min.js.map
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -217,7 +217,7 @@
|
||||
</script>
|
||||
{% endblock %}
|
||||
{% block scripts %}
|
||||
<script src="{{ 'assets/javascripts/bundle.b83fae36.min.js' | url }}"></script>
|
||||
<script src="{{ 'assets/javascripts/bundle.926459b3.min.js' | url }}"></script>
|
||||
{% for path in config["extra_javascript"] %}
|
||||
<script src="{{ path | url }}"></script>
|
||||
{% endfor %}
|
||||
|
@ -23,6 +23,7 @@
|
||||
import "focus-visible"
|
||||
import { Subject, defer, merge } from "rxjs"
|
||||
import {
|
||||
delay,
|
||||
filter,
|
||||
map,
|
||||
mergeWith,
|
||||
@ -96,9 +97,15 @@ setupClipboardJS({ alert$ })
|
||||
if (feature("navigation.instant"))
|
||||
setupInstantLoading({ document$, location$, viewport$ })
|
||||
|
||||
/* Always close drawer on navigation */
|
||||
/* Always close drawer and search on navigation */
|
||||
merge(location$, target$)
|
||||
.subscribe(() => setToggle("drawer", false))
|
||||
.pipe(
|
||||
delay(125)
|
||||
)
|
||||
.subscribe(() => {
|
||||
setToggle("drawer", false)
|
||||
setToggle("search", false)
|
||||
})
|
||||
|
||||
/* Set up global keyboard handlers */
|
||||
keyboard$
|
||||
|
Loading…
Reference in New Issue
Block a user