mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-11-13 18:40:54 +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>
|
</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block scripts %}
|
{% 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"] %}
|
{% for path in config["extra_javascript"] %}
|
||||||
<script src="{{ path | url }}"></script>
|
<script src="{{ path | url }}"></script>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
import "focus-visible"
|
import "focus-visible"
|
||||||
import { Subject, defer, merge } from "rxjs"
|
import { Subject, defer, merge } from "rxjs"
|
||||||
import {
|
import {
|
||||||
|
delay,
|
||||||
filter,
|
filter,
|
||||||
map,
|
map,
|
||||||
mergeWith,
|
mergeWith,
|
||||||
@ -96,9 +97,15 @@ setupClipboardJS({ alert$ })
|
|||||||
if (feature("navigation.instant"))
|
if (feature("navigation.instant"))
|
||||||
setupInstantLoading({ document$, location$, viewport$ })
|
setupInstantLoading({ document$, location$, viewport$ })
|
||||||
|
|
||||||
/* Always close drawer on navigation */
|
/* Always close drawer and search on navigation */
|
||||||
merge(location$, target$)
|
merge(location$, target$)
|
||||||
.subscribe(() => setToggle("drawer", false))
|
.pipe(
|
||||||
|
delay(125)
|
||||||
|
)
|
||||||
|
.subscribe(() => {
|
||||||
|
setToggle("drawer", false)
|
||||||
|
setToggle("search", false)
|
||||||
|
})
|
||||||
|
|
||||||
/* Set up global keyboard handlers */
|
/* Set up global keyboard handlers */
|
||||||
keyboard$
|
keyboard$
|
||||||
|
Loading…
Reference in New Issue
Block a user