mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03:00
Fixed search hotkeys to trigger for smaller screen sizes
This commit is contained in:
parent
bcc8552876
commit
8049185aa8
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -53,7 +53,7 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block styles %}
|
{% block styles %}
|
||||||
<link rel="stylesheet" href="{{ 'assets/stylesheets/application.cd328f5c.css' | url }}">
|
<link rel="stylesheet" href="{{ 'assets/stylesheets/application.750b69bd.css' | url }}">
|
||||||
{% if palette.primary or palette.accent %}
|
{% if palette.primary or palette.accent %}
|
||||||
<link rel="stylesheet" href="{{ 'assets/stylesheets/application-palette.224b79ff.css' | url }}">
|
<link rel="stylesheet" href="{{ 'assets/stylesheets/application-palette.224b79ff.css' | url }}">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -190,7 +190,7 @@
|
|||||||
{% endblock %}
|
{% endblock %}
|
||||||
</div>
|
</div>
|
||||||
{% block scripts %}
|
{% block scripts %}
|
||||||
<script src="{{ 'assets/javascripts/application.0caf228d.js' | url }}"></script>
|
<script src="{{ 'assets/javascripts/application.bef98be6.js' | url }}"></script>
|
||||||
{% if lang.t("search.language") != "en" %}
|
{% if lang.t("search.language") != "en" %}
|
||||||
{% set languages = lang.t("search.language").split(",") %}
|
{% set languages = lang.t("search.language").split(",") %}
|
||||||
{% if languages | length and languages[0] != "" %}
|
{% if languages | length and languages[0] != "" %}
|
||||||
|
@ -320,7 +320,6 @@ function initialize(config) { // eslint-disable-line func-style
|
|||||||
}).listen()
|
}).listen()
|
||||||
|
|
||||||
/* Listener: open search on focus */
|
/* Listener: open search on focus */
|
||||||
new Material.Event.MatchMedia("(min-width: 960px)",
|
|
||||||
new Material.Event.Listener("[data-md-component=query]", "focus", () => {
|
new Material.Event.Listener("[data-md-component=query]", "focus", () => {
|
||||||
const toggle = document.querySelector("[data-md-toggle=search]")
|
const toggle = document.querySelector("[data-md-toggle=search]")
|
||||||
if (!(toggle instanceof HTMLInputElement))
|
if (!(toggle instanceof HTMLInputElement))
|
||||||
@ -329,7 +328,7 @@ function initialize(config) { // eslint-disable-line func-style
|
|||||||
toggle.checked = true
|
toggle.checked = true
|
||||||
toggle.dispatchEvent(new CustomEvent("change"))
|
toggle.dispatchEvent(new CustomEvent("change"))
|
||||||
}
|
}
|
||||||
}))
|
}).listen()
|
||||||
|
|
||||||
/* Listener: keyboard handlers */ // eslint-disable-next-line complexity
|
/* Listener: keyboard handlers */ // eslint-disable-next-line complexity
|
||||||
new Material.Event.Listener(window, "keydown", ev => { // TODO: split up into component to reduce complexity
|
new Material.Event.Listener(window, "keydown", ev => { // TODO: split up into component to reduce complexity
|
||||||
|
@ -189,9 +189,9 @@ $md-toggle__search--checked:
|
|||||||
|
|
||||||
// Adjust for RTL languages
|
// Adjust for RTL languages
|
||||||
[dir="rtl"] & {
|
[dir="rtl"] & {
|
||||||
float: left;
|
|
||||||
margin-right: initial;
|
margin-right: initial;
|
||||||
margin-left: px2rem(20px);
|
margin-left: px2rem(20px);
|
||||||
|
float: left;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user