Skip to content
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

std libs collapse doesn't work anymore #24918

Closed
mdinger opened this issue Apr 28, 2015 · 4 comments
Closed

std libs collapse doesn't work anymore #24918

mdinger opened this issue Apr 28, 2015 · 4 comments
Labels
T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@mdinger
Copy link
Contributor

mdinger commented Apr 28, 2015

The collapse button at the top right on the std lib docs doesn't work anymore. It should.

@mdinger
Copy link
Contributor Author

mdinger commented Apr 28, 2015

beta doesn't work either.

@alexcrichton alexcrichton added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Apr 28, 2015
@Diggsey
Copy link
Contributor

Diggsey commented Apr 29, 2015

The problem is in "main.js" in the "toggle-all-docs" event handler, which is attempting to use the HTML entities for '+'/'−' in a javascript string. This was likely broken when '[-]' was changed to '[−]'. It should use a unicode escape sequence.

bors added a commit that referenced this issue May 7, 2015
My change in #24797 had a bug, described in that issue’s comments, and first discovered in issue #24918. This fixes it.

I tested this new `main.js` by changing the `main.js` content of [a rendered docs page](https://doc.rust-lang.org/std/option/) to this new content. The ‘[−]’ button worked again.

I am also including another related fix, because it would require manual merging if I made a separate pull request for it. The page-global ‘[−]’ button currently adds `#` to the end of the URL whenever it is clicked. I am changing its `href` from `#` to `javascript:void(0)` (the same as the `href` for section-specific ‘[−]’ links) to fix that.
@mohtar
Copy link

mohtar commented May 10, 2015

The pull request has been merged and it looks like the collapse button is working in the nightly docs now. This should be closed.

@mdinger
Copy link
Contributor Author

mdinger commented May 10, 2015

Yup

@mdinger mdinger closed this as completed May 10, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

4 participants