about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJohannes Oertel <johannes.oertel@uni-due.de>2015-06-18 17:11:44 +0200
committerJohannes Oertel <johannes.oertel@uni-due.de>2015-06-18 18:39:31 +0200
commitd234b0bb5f3210ca255d1ad71eb13add272fd078 (patch)
treed5417097600fb2443b074139eb3a4734f1540bd4
parent7a13b93b00af4e8f8b3baae2926e9877f5f6403d (diff)
rustdoc: Update document title when displaying search results
Fixes #26360.
-rw-r--r--src/librustdoc/html/static/main.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/librustdoc/html/static/main.js b/src/librustdoc/html/static/main.js
index 7f8f40ff08a..fb8f511795e 100644
--- a/src/librustdoc/html/static/main.js
+++ b/src/librustdoc/html/static/main.js
@@ -571,6 +571,9 @@
                 return;
             }
 
+            // Update document title to maintain a meaningful browser history
+            $(document).prop("title", "Results for " + query.query + " - Rust");
+
             // Because searching is incremental by character, only the most
             // recent search query is added to the browser history.
             if (browserSupportsHistoryApi()) {