-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Save the highlighted item when switching tab #45288
Conversation
Some changes occurred in HTML/CSS. |
(rust_highfive has picked a reviewer for you, use r? to override) |
src/librustdoc/html/static/main.js
Outdated
@@ -696,39 +703,52 @@ | |||
var search_input = document.getElementsByClassName('search-input')[0]; | |||
search_input.onkeydown = null; | |||
search_input.onkeydown = function(e) { | |||
var actives = []; | |||
var actives = [[], [], []]; | |||
var current = 0; |
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.
What does this current
store? Is it the same as the currentTab
from the outer scope?
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.
No, it's a local one when we're iterating over tabs. I'll update the variable's name.
src/librustdoc/html/static/main.js
Outdated
@@ -696,39 +703,52 @@ | |||
var search_input = document.getElementsByClassName('search-input')[0]; | |||
search_input.onkeydown = null; |
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.
Is that line still required?
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.
Nope. Removing it. Thanks for spotting it!
63d4c3d
to
2b5ff93
Compare
2b5ff93
to
f442326
Compare
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.
Looks good to me. Thank you 👍
Looks good! r=me when #45281 hits. This seems to be a superset of that PR, so hopefully it won't make a merge conflict. |
@bors: r=QuietMisdreavus |
📌 Commit f442326 has been approved by |
Save the highlighted item when switching tab To be merged after #45281. r? @rust-lang/docs
☀️ Test successful - status-appveyor, status-travis |
To be merged after #45281.
r? @rust-lang/docs