diff options
| author | León Orell Valerian Liehr <me@fmease.dev> | 2025-02-15 03:27:22 +0100 |
|---|---|---|
| committer | León Orell Valerian Liehr <me@fmease.dev> | 2025-02-15 03:39:28 +0100 |
| commit | 351cc1f5b7d7bee7f9accf75d768e2d179a6f89d (patch) | |
| tree | c3371c72c6259ea01b03bec6a450de369c0b0dcf | |
| parent | d8810e3e2dab96778d20dd6d746ff95465515509 (diff) | |
| download | rust-351cc1f5b7d7bee7f9accf75d768e2d179a6f89d.tar.gz rust-351cc1f5b7d7bee7f9accf75d768e2d179a6f89d.zip | |
rustdoc: Properly restore search input placeholder
| -rw-r--r-- | src/librustdoc/html/static/js/search.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/librustdoc/html/static/js/search.js b/src/librustdoc/html/static/js/search.js index 121a43e3d92..ccbd6811b07 100644 --- a/src/librustdoc/html/static/js/search.js +++ b/src/librustdoc/html/static/js/search.js @@ -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 |
