Fix search hotkey

https://github.com/rust-lang/mdBook/pull/2608 accidentally broke the
search "S" keybinding by using the wrong capitalization.
This commit is contained in:
Eric Huss
2025-05-26 10:58:53 -07:00
parent cdbf6d2806
commit 0210e69abc
2 changed files with 2 additions and 2 deletions

View File

@@ -356,7 +356,7 @@ window.search = window.search || {};
}
showSearch(false);
marker.unmark();
} else if (!hasFocus() && (e.key === 'S' || e.key === '/')) {
} else if (!hasFocus() && (e.key === 's' || e.key === '/')) {
e.preventDefault();
showSearch(true);
window.scrollTo(0, 0);

View File

@@ -7,7 +7,7 @@ define-function: (
[],
block {
assert-css: ("#search-wrapper", {"display": "none"})
press-key: 'S'
press-key: 's'
wait-for-css-false: ("#search-wrapper", {"display": "none"})
}
)