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
Cannot view PEP docs on mobile Chrome and Safari #531
Comments
On Fri, Jan 2, 2015 at 10:23 AM, Chris Jerdonek notifications@github.com
I tried with PEP 440 (your example), PEP 1 and PEP 8 on my Android phone. I Thx, Skip Montanaro |
Here is another page (non-PEP) that it happens on: https://www.python.org/psf-landing/ |
On the PSF page, for example, if I scroll down, as soon as the scrolling stops, it resets back to the top. |
On Fri, Jan 2, 2015 at 11:29 AM, Chris Jerdonek notifications@github.com
Thanks. I was able to reproduce this on my Android phone (using Chrome) as Skip |
I have this problem on chrome 40 mobile as well. It makes nearly every page on python.org unbrowseable. |
I can confirm this to. It is happening on my android phone and tablet in chrome. It is really annoying. |
The trouble makes a jumping browser's bar at the top of window. |
Any progress on this bug? It's been confirmed multiple times since Chris first reported it over two months ago. |
You can also reproduce this bug on desktop by shrinking your browser window so it uses the mobile layout, and then adjusting the height of the browser window |
@ArrestedDevelopment could you please give more details? I would like to fix this, but a) I don't use a smartphone b) I couldn't reproduce it on desktop by using Chrome's responsive design mode (also tried to shrink the browser window) So I need to reproduce the problem before trying to fix it :) |
@berkerpeksag I made a quick gif/recording of the problem. It shows up in Firefox too: |
In that case, perhaps the hiding and showing of the toolbar when scrolling in some mobile browsers is triggering this. |
@ArrestedDevelopment thank you! :) Now I understand the problem and can reproduce it. I think the problem is somewhere in https://github.com/python/pythondotorg/blob/master/static/js/script.js#L56 (most likely in line 70 or line 89) Will try to investigate tomorrow. |
@jhogue could you also take a look at this one when you get a chance? It's a pretty bad usability situation. |
More info: It primarily happens on mobile devices. If you scroll up just a pinch, it jumps straight to the top. |
It also seems to be something browser-specific. Chrome for Android has the issue; Lightning doesn't. |
I believe this line is the culprit: $('body, html').animate({ scrollTop: $('#python-network').offset().top }, 300); I believe one of the event handlers (likely the resize event) is being fired incorrectly. I'm pretty sure the jQuery animation should not be fired when the screen is rotated or resized; only when it's loaded initially (websites that scroll when I rotate the phone screen tend to get on people's nerves). |
@kirbyfan64 yes - that's addressed in two places in #788. |
Thanks to @nirgn975, we have a fix now. It would be amazing if you could test it at https://staging.python.org/ |
I confirmed the fix as follows:
Thanks! |
Android Chrome - fail. |
On Thu, Jul 23, 2015 at 8:37 AM, Berker Peksag notifications@github.com
Still failing for me using Chrome Beta, visiting https://staging.python.org/dev/peps/pep-0008/ chrome://version tells me I am using "44.0.2403.104 (Official Build) beta Skip |
Android Chrome - fail. |
Little scroll to top. |
Can we consider removing the scroll animation altogether? It's hard to see |
Works for me! Other than this weird issue where, when jump down to the menu and try to scroll up a little, it scrolls back down a bit. To those for whom it doesn't work: beware that some links on the staging site link back to the main one. |
Strange. Android, Chrome: DONE |
Despite the fact that it had been ages since I visited PEPs on my phone
(probably only ever to test this bug), it appears it was a caching issue. I
restarted my phone, cleared the cache and tried again. No problem.
Skip
|
The fix has still the following issue on my iPhone 5s iOS 8.4: |
@youtux Same here on Chrome for Android. |
Some cache busting can help. |
Yeah, it has trouble with "portrait-landscape-portrait" smartphone rotation. |
@youtux yes, that's expected since we only removed the scroll animation for the window.resize event. I think @davb5's suggestion sounds good. |
@youtux @lepot311 could you please test https://staging.python.org/ again? Just pushed another commit. |
@berkerpeksag Works for me. |
Works great for me too, awesome work! |
It works! Great work! |
Works, loving it! Finally I can read up on generators/coroutines on the loo :D thank you for your work! |
Thanks for testing, all! Just deployed to prod. |
Somebody wrote webmaster with this problem on his IPhone 6. I told him to clear his |
Yes, those two commits are in the release branch: https://github.com/python/pythondotorg/commits/release Could be a CDN/cache issue. Just purged |
This issue still seems to be present in some form. For example, go to the following page: https://www.python.org/dev/peps/pep-0495/ and scroll down a bit (e.g. to the figure in the abstract). Then pinch to zoom in on the picture and zoom out. (You may need to zoom in and out a few times. It doesn't seem to happen every time.) When I zoom in and out, the page pops back to the top. I noticed this in the normal course of reading a PEP and zooming in and out on some words to see the screen better. |
Yeah, the viewport size changes caused by zooming or scrolling in Chrome (which hides/shows the address bar) is what's causing that bug. There must be stale JS running on Python.org because it's still buggy there for me - but works fine on the staging link linked above |
Actually, I can still reproduce even when restricting to scrolling up and down (no zooming). This is on an iPhone 5S (after clearing the cache and resetting my phone) with the latest Chrome 44.0.2403.67. |
For a while I've noticed a serious problem that makes pages like the following unreadable on my mobile device:
https://www.python.org/dev/peps/pep-0440/
It happens for me with both Chrome and Safari on the latest iOS 8.1.2, though I believe it happened for me on older iOS versions, too. An Android user has also reproduced the issue.
After the page is fully loaded, if I scroll down, say, halfway through the page, the browser will jump back to the very top. This effectively makes it impossible to read the page. I have never noticed this issue with any page not hosted on python.org.
The text was updated successfully, but these errors were encountered: