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); showSearch(false);
marker.unmark(); marker.unmark();
} else if (!hasFocus() && (e.key === 'S' || e.key === '/')) { } else if (!hasFocus() && (e.key === 's' || e.key === '/')) {
e.preventDefault(); e.preventDefault();
showSearch(true); showSearch(true);
window.scrollTo(0, 0); window.scrollTo(0, 0);

View file

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