-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rustdoc: Update document title when displaying search results #26401
Conversation
@@ -571,6 +571,9 @@ | |||
return; | |||
} | |||
|
|||
// Update document title to maintain a meaningful browser history | |||
$(document).prop("title", "Results for " + query.query + " - Rust"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You've got a tab here and the code below and above is using only spaces...
Promoted tabs to spaces. |
@bors: r+ rollup |
📌 Commit d234b0b has been approved by |
@jooert Does this change the title back when the user exits the search mode (by pressing ESC)? (Should it?) |
Currently, it doesn't. But we also do not add a new entry to the browser history on pressing ESC at the moment. But, although the search query is still visible in the input field after pressing ESC, I wasn't able to go back to the results for this query (other than modifying the search query), so this whole ESC-pressing feature probably needs more work anyway. (?) |
Fixes #26360.
r? @steveklabnik