rustdoc: Properly restore search input placeholder

This commit is contained in:
León Orell Valerian Liehr 2025-02-15 03:27:22 +01:00
parent d8810e3e2d
commit 351cc1f5b7
No known key found for this signature in database
GPG key ID: D17A07215F68E713

View file

@ -5318,8 +5318,9 @@ function registerSearchEvents() {
// @ts-expect-error
searchState.input.addEventListener("blur", () => {
// @ts-expect-error
searchState.input.placeholder = searchState.input.origPlaceholder;
if (window.searchState.input) {
window.searchState.input.placeholder = window.searchState.origPlaceholder;
}
});
// Push and pop states are used to add search results to the browser