mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2026-07-23 22:33:42 -04:00
Package theme for submission to PyPI
This commit is contained in:
@@ -171,8 +171,10 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
}
|
||||
|
||||
/* Register resize handler and fire once */
|
||||
window.addEventListener('resize', check);
|
||||
check();
|
||||
if (!Modernizr.ios) {
|
||||
window.addEventListener('resize', check);
|
||||
check();
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------------
|
||||
* Initialize search index
|
||||
@@ -258,6 +260,10 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
document.body.classList.remove('locked');
|
||||
toggle.checked = false;
|
||||
|
||||
/* Don't catch anchors if the search doesn't cover the page */
|
||||
if (matchMedia('only screen and (min-width: 960px)').matches)
|
||||
return;
|
||||
|
||||
/* Prevent default to intercept scroll-to behaviour and
|
||||
stop propagation, as this interferes with the link-lock in
|
||||
the web application context, which opens all internal links
|
||||
@@ -347,7 +353,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
setTimeout(function() {
|
||||
|
||||
/* This additional check is necessary to handle fast subsequent clicks
|
||||
on the toggle and the timeout to lock the body must be canceled */
|
||||
on the toggle and the timeout to lock the body must be cancelled */
|
||||
if (this.checked) {
|
||||
if (lock)
|
||||
list.add('locked');
|
||||
|
||||
Reference in New Issue
Block a user