1
0
mirror of https://github.com/squidfunk/mkdocs-material.git synced 2024-11-28 09:20:52 +01:00

Fixed closing of search results on anchor jump

This commit is contained in:
squidfunk 2020-03-12 17:13:31 +01:00
parent 566b1363ee
commit c0abaf5692
6 changed files with 14 additions and 21 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
{ {
"assets/javascripts/bundle.js": "assets/javascripts/bundle.63b8430f.min.js", "assets/javascripts/bundle.js": "assets/javascripts/bundle.21a66646.min.js",
"assets/javascripts/bundle.js.map": "assets/javascripts/bundle.63b8430f.min.js.map", "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": "assets/javascripts/vendor.b0b43276.min.js",
"assets/javascripts/vendor.js.map": "assets/javascripts/vendor.b0b43276.min.js.map", "assets/javascripts/vendor.js.map": "assets/javascripts/vendor.b0b43276.min.js.map",
"assets/javascripts/worker/search.js": "assets/javascripts/worker/search.784c5235.min.js", "assets/javascripts/worker/search.js": "assets/javascripts/worker/search.784c5235.min.js",

View File

@ -178,7 +178,7 @@
{% endblock %} {% endblock %}
{% block scripts %} {% block scripts %}
<script src="{{ 'assets/javascripts/vendor.b0b43276.min.js' | url }}"></script> <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 = {} -%} {%- set translations = {} -%}
{%- for key in [ {%- for key in [
"clipboard.copy", "clipboard.copy",

View File

@ -57,7 +57,8 @@ import {
watchLocationHash, watchLocationHash,
watchViewport, watchViewport,
isLocationInternal, isLocationInternal,
isLocationAnchor isLocationAnchor,
setLocationHash
} from "./browser" } from "./browser"
import { setupSearchWorker } from "./workers" import { setupSearchWorker } from "./workers"
@ -270,20 +271,12 @@ export function initialize(config: unknown) {
/* ----------------------------------------------------------------------- */ /* ----------------------------------------------------------------------- */
// // put into search... // // put into search...
// hash$ hash$
// .pipe( .pipe(
// switchMap(hash => useToggle("search") tap(() => setToggle("search", false)),
// .pipe( delay(125), // ensure that it runs after the body scroll reset...
// filter(x => x.checked), // only active )
// tap(toggle => setToggle(toggle, false)), .subscribe(hash => setLocationHash(`#${hash}`)) // TODO: must be unified
// delay(125), // ensure that it runs after the body scroll reset...
// mapTo(hash)
// )
// )
// )
// .subscribe(hash => {
// getElement(`[id="${hash}"]`)!.scrollIntoView()
// })
// Scroll lock // document -> document$ => { body } !? // Scroll lock // document -> document$ => { body } !?
// put into search... // put into search...