Uh oh!
There was an error while loading. Please reload this page.
Automatically expand a section even after page load - #53626
Conversation
rust-highfive
commented
Aug 23, 2018
Some changes occurred in HTML/CSS. |
rust-highfive
commented
Aug 23, 2018
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @QuietMisdreavus (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
GuillaumeGomez
commented
Aug 23, 2018
Already fixed in #53094. You can see it in action in nightly docs: https://doc.rust-lang.org/nightly/std/vec/struct.Vec.html#method.extend Thanks anyway! 😉 |
GuillaumeGomez
commented
Aug 23, 2018
Ah hold on, nevermind! I didn't see you extended it, my bad. Reopening and reviewing. |
| if (elem && isHidden(elem.offsetParent)) { | ||
| var h3 = elem.parentNode.previousSibling; | ||
| if (h3.tagName !== 'H3') { |
There was a problem hiding this comment.
Please check if h3 exists before accessing tagName.
| } | ||
| var elem = document.getElementById(hash); | ||
| if (elem && isHidden(elem.offsetParent)) { |
There was a problem hiding this comment.
offsetParent can be null, please check it before calling isHidden.
GuillaumeGomez
commented
Aug 23, 2018
Two nits to fix and it's good to go. |
ehuss
commented
Aug 23, 2018
Would it be possible to fix the issues listed in #48726? It looks like this is close, but doesn't seem to work on those examples. |
GuillaumeGomez
commented
Aug 23, 2018
@ehuss This PR should fix it. |
GuillaumeGomez
commented
Aug 23, 2018
bors
commented
Aug 23, 2018
📌 Commit 1f441a0 has been approved by |
ehuss
commented
Aug 23, 2018
I tried this patch, it doesn't seem to work.
|
GuillaumeGomez
commented
Aug 24, 2018
Doing the expansion on onhashchange seems too late. Fixesrust-lang#48726
kzys
commented
Aug 25, 2018
ehuss
commented
Aug 25, 2018
I tried a variety of things, and everything seems to work now! TYVM!! |
GuillaumeGomez
commented
Aug 25, 2018
Thanks a lot again, let's get this in! @bors: r+ rollup |
bors
commented
Aug 25, 2018
📌 Commit 2c61f3c has been approved by |
Automatically expand a section even after page load Fixesrust-lang#52774
Rollup of 5 pull requests Successful merges: - #53043 (Improve unstable message display) - #53428 (libtest terse format: show how far in we are) - #53626 (Automatically expand a section even after page load) - #53651 (Add struct keyword doc) - #53706 (rustdoc: Fix gap on section anchor symbol when hovering.) Failed merges: - #53472 (Use FxHash{Map,Set} instead of the default Hash{Map,Set} everywhere in rustc.) r? @ghost
Rollup of 5 pull requests Successful merges: - #53043 (Improve unstable message display) - #53428 (libtest terse format: show how far in we are) - #53626 (Automatically expand a section even after page load) - #53651 (Add struct keyword doc) - #53706 (rustdoc: Fix gap on section anchor symbol when hovering.) Failed merges: - #53472 (Use FxHash{Map,Set} instead of the default Hash{Map,Set} everywhere in rustc.) r? @ghost
Fixes#52774