cognitive-engineering-lab / rust-book

The Rust Programming Language: Experimental Edition
https://rust-book.cs.brown.edu
Other
503 stars 82 forks source link

Error blockquote doesn't scroll properly on iOS #160

Open nk9 opened 5 months ago

nk9 commented 5 months ago

URL to the section(s) of the book with this problem: https://rust-book.cs.brown.edu/ch04-02-references-and-borrowing.html#data-must-outlive-all-of-its-references

Description of the problem: On iOS, the horizontal scrolling for this particular error code block is broken. A horizontal swipe in either direction will only get you maybe 20px of scrolling. It only seems to be an issue in this one block, other Rust error blocks on the same page work fine.

https://github.com/cognitive-engineering-lab/rust-book/assets/3646730/1ac894e0-e6ae-4fdc-9bb6-641b12d8c036

Suggested fix: No idea, sorry. I'd investigate if I could build the book…

willcrichton commented 3 months ago

Confirmed that I could reproduce this. I narrowed the issue specifically to the permission stack that appears in the blockquote ("we will abbreviate them as dots like"). I genuinely have no idea why that element is interfering with mobile scroll behavior -- I will continue to investigate.

nk9 commented 3 months ago

I'm not sure if it's weirder or not that you also get this behavior when using the horizontal scroll thumb! Over the years, I have seen odd scrolling behavior with gestures or the scroll wheel. But I don't think I've ever seen the scroll thumb behave this way. Super strange. I wonder if it's a WebKit bug?