mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03:00
Fixed closing of search results on anchor jump
This commit is contained in:
parent
566b1363ee
commit
c0abaf5692
File diff suppressed because one or more lines are too long
1
material/assets/javascripts/bundle.21a66646.min.js.map
Normal file
1
material/assets/javascripts/bundle.21a66646.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
@ -1,6 +1,6 @@
|
||||
{
|
||||
"assets/javascripts/bundle.js": "assets/javascripts/bundle.63b8430f.min.js",
|
||||
"assets/javascripts/bundle.js.map": "assets/javascripts/bundle.63b8430f.min.js.map",
|
||||
"assets/javascripts/bundle.js": "assets/javascripts/bundle.21a66646.min.js",
|
||||
"assets/javascripts/bundle.js.map": "assets/javascripts/bundle.21a66646.min.js.map",
|
||||
"assets/javascripts/vendor.js": "assets/javascripts/vendor.b0b43276.min.js",
|
||||
"assets/javascripts/vendor.js.map": "assets/javascripts/vendor.b0b43276.min.js.map",
|
||||
"assets/javascripts/worker/search.js": "assets/javascripts/worker/search.784c5235.min.js",
|
||||
|
@ -178,7 +178,7 @@
|
||||
{% endblock %}
|
||||
{% block scripts %}
|
||||
<script src="{{ 'assets/javascripts/vendor.b0b43276.min.js' | url }}"></script>
|
||||
<script src="{{ 'assets/javascripts/bundle.63b8430f.min.js' | url }}"></script>
|
||||
<script src="{{ 'assets/javascripts/bundle.21a66646.min.js' | url }}"></script>
|
||||
{%- set translations = {} -%}
|
||||
{%- for key in [
|
||||
"clipboard.copy",
|
||||
|
@ -57,7 +57,8 @@ import {
|
||||
watchLocationHash,
|
||||
watchViewport,
|
||||
isLocationInternal,
|
||||
isLocationAnchor
|
||||
isLocationAnchor,
|
||||
setLocationHash
|
||||
} from "./browser"
|
||||
import { setupSearchWorker } from "./workers"
|
||||
|
||||
@ -270,20 +271,12 @@ export function initialize(config: unknown) {
|
||||
/* ----------------------------------------------------------------------- */
|
||||
|
||||
// // put into search...
|
||||
// hash$
|
||||
// .pipe(
|
||||
// switchMap(hash => useToggle("search")
|
||||
// .pipe(
|
||||
// filter(x => x.checked), // only active
|
||||
// tap(toggle => setToggle(toggle, false)),
|
||||
// delay(125), // ensure that it runs after the body scroll reset...
|
||||
// mapTo(hash)
|
||||
// )
|
||||
// )
|
||||
// )
|
||||
// .subscribe(hash => {
|
||||
// getElement(`[id="${hash}"]`)!.scrollIntoView()
|
||||
// })
|
||||
hash$
|
||||
.pipe(
|
||||
tap(() => setToggle("search", false)),
|
||||
delay(125), // ensure that it runs after the body scroll reset...
|
||||
)
|
||||
.subscribe(hash => setLocationHash(`#${hash}`)) // TODO: must be unified
|
||||
|
||||
// Scroll lock // document -> document$ => { body } !?
|
||||
// put into search...
|
||||
|
Loading…
Reference in New Issue
Block a user