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

Fix sidebar scroll on mobile devices #78013

Merged

Conversation

GuillaumeGomez
Copy link
Member

Fixes #77942.

The issue was coming from the appearance/disappearance of the "wrapper" on the mobile devices web browsers, which triggers the "resize" event, calling the hideSidebar function is the JS code.

r? @jyn514

@GuillaumeGomez GuillaumeGomez added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. A-rustdoc-ui Area: Rustdoc UI (generated HTML) labels Oct 16, 2020
@rust-highfive
Copy link
Collaborator

Some changes occurred in HTML/CSS/JS.

cc @GuillaumeGomez

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 16, 2020
Comment on lines -2719 to -2721
window.onresize = function() {
hideSidebar();
};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will impact desktops too, right? Is that intentional? Do you know why this was added in the first place?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It won't have impact on desktop because it was only used for mobile devices. As for what it was used originally, I'm not sure... It was three years ago so things evolved quite a lot in the meantime in both rustdoc and mobile web browsers...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, seems reasonable.

@jyn514
Copy link
Member

jyn514 commented Oct 16, 2020

@bors r+

not 100% sure about this change but I trust @GuillaumeGomez's word.

@bors
Copy link
Contributor

bors commented Oct 16, 2020

📌 Commit a577942 has been approved by jyn514

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 16, 2020
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Oct 16, 2020
…obile-devices, r=jyn514

Fix sidebar scroll on mobile devices

Fixes rust-lang#77942.

The issue was coming from the appearance/disappearance of the "wrapper" on the mobile devices web browsers, which triggers the "resize" event, calling the `hideSidebar` function is the JS code.

r? @jyn514
JohnTitor added a commit to JohnTitor/rust that referenced this pull request Oct 16, 2020
…obile-devices, r=jyn514

Fix sidebar scroll on mobile devices

Fixes rust-lang#77942.

The issue was coming from the appearance/disappearance of the "wrapper" on the mobile devices web browsers, which triggers the "resize" event, calling the `hideSidebar` function is the JS code.

r? @jyn514
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 16, 2020
Rollup of 10 pull requests

Successful merges:

 - rust-lang#75209 (Suggest imports of unresolved macros)
 - rust-lang#77547 (stabilize union with 'ManuallyDrop' fields and 'impl Drop for Union')
 - rust-lang#77827 (Don't link to nightly primitives on stable channel)
 - rust-lang#77855 (resolve: further improvements to "try using the enum's variant" diagnostic)
 - rust-lang#77900 (Use fdatasync for File::sync_data on more OSes)
 - rust-lang#77925 (Suggest minimal subset features in `incomplete_features` lint)
 - rust-lang#77971 (Deny broken intra-doc links in linkchecker)
 - rust-lang#77991 (Bump backtrace-rs)
 - rust-lang#77992 (instrument-coverage: try our best to not ICE)
 - rust-lang#78013 (Fix sidebar scroll on mobile devices)

Failed merges:

r? `@ghost`
@bors bors merged commit 001fcd9 into rust-lang:master Oct 16, 2020
@rustbot rustbot added this to the 1.49.0 milestone Oct 16, 2020
@GuillaumeGomez GuillaumeGomez deleted the fix-sidebar-scroll-mobile-devices branch October 16, 2020 23:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rustdoc-ui Area: Rustdoc UI (generated HTML) S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rustdoc closes sidebar when window is resized
5 participants