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

Horizontal overscroll on iOS #92771

Open
jsha opened this issue Jan 11, 2022 · 2 comments · Fixed by #92801
Open

Horizontal overscroll on iOS #92771

jsha opened this issue Jan 11, 2022 · 2 comments · Fixed by #92801
Labels
A-rustdoc-ui Area: rustdoc UI (generated HTML) O-ios Operating system: iOS T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@jsha
Copy link
Contributor

jsha commented Jan 11, 2022

Steps to reproduce:

  1. Visit e.g. https://doc.rust-lang.org/nightly/std/iter/trait.Iterator.html or https://doc.rust-lang.org/nightly/std/vec/struct.Vec.html on an iPhone in Safari.
  2. Press the screen and drag left or right.

Expected result:

No left-right scrolling happens.

Actual result:

Browser applies the "overscroll" effect horizontally, letting the scroll go past the edge of the screen, then bounce back.

This is unpleasant for scrolling long docs. It means that an up-down scroll that is not perfectly vertical can get turned into a horizontal scroll.

According to https://stackoverflow.com/questions/15879710/disabling-horizontal-scroll-on-an-iphone-website it sounds like this happens when some element has horizontal overflow. Worth noting that some shorter pages like https://doc.rust-lang.org/nightly/std/string/trait.ToString.html don't exhibit the same behavior. So presumably there is indeed some horizontal overflow on the really long pages like Vec and Iterator, and we need to figure out where it is.

Tested on an iPhone 7 running iOS 15.2.

@jsha jsha 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 Jan 11, 2022
@jsha
Copy link
Contributor Author

jsha commented Jan 11, 2022

Here's an example of an item that exceeds the horizontal bounds in mobile mode: https://doc.rust-lang.org/nightly/std/iter/trait.Iterator.html#method.try_find

The Residual<Option<Self::Item>>>::TryType part of the type signature is too wide for the window but doesn't get wrapped. Adding overflow-wrap: anywhere fixes it.

@jsha
Copy link
Contributor Author

jsha commented Mar 27, 2022

Reopening. This is fixed on beta, but on nightly it's regressed. I'm not yet sure why, but it seems like the proximate cause it that some item-infos extend past the right border, like this one on Iterator's page, on the impl for ScmCredentials:

PXL_20220327_061722813 MP

@jsha jsha reopened this Mar 27, 2022
@workingjubilee workingjubilee added the O-ios Operating system: iOS label Mar 2, 2023
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) O-ios Operating system: iOS T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants