mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2026-08-01 10:18:54 -04:00
Reset meta text to placeholder if input is cleared
This commit is contained in:
@@ -232,8 +232,13 @@ function initialize(config) { // eslint-disable-line func-style
|
||||
/* Search is open */
|
||||
if (toggle.checked) {
|
||||
|
||||
/* Enter: prevent form submission */
|
||||
if (ev.key === "Enter") {
|
||||
if (query === document.activeElement)
|
||||
ev.preventDefault()
|
||||
|
||||
/* Escape: close search */
|
||||
if (ev.key === "Escape") {
|
||||
} else if (ev.key === "Escape") {
|
||||
toggle.checked = false
|
||||
toggle.dispatchEvent(new CustomEvent("change"))
|
||||
query.blur()
|
||||
|
||||
Reference in New Issue
Block a user