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 overscroll issues locking scroll up on long pages. #10227

Merged
merged 1 commit into from
Sep 30, 2018

Commits on Sep 28, 2018

  1. Fix overscroll issues locking scroll up on long pages.

    This, I think, fixes #8603.
    
    I wasn't able to reproduce the exact issue, but I was able to reproduce a different one which I think is the same minus some browser behavior differences.
    
    Essentially, when you don't scroll the `body` but instead scroll an element, once you've scrolled to the end of that element, pause, and then try to scroll further, browsers now try to scroll the _parent_ element, in this case `body`. But because that isn't scrollable, some browsers apply an "overscroll bounce", others just prevent scrolling, even upwards.
    
    Steps to reproduce:
    
    1. Have a page with enough content to create a scrollbar.
    2. Scroll to the very end of that content.
    3. Hold a brief pause in scrolling.
    4. Now in one motion first scroll downwards and then immediately start scrolling upwards.
    
    Observe that you're not scrolling anywhere, or you're invoking overscroll bounces.
    
    Step 4 is crucial — it is BECAUSE we start by scrolling _downwards_ that the browser decides to try and scroll the body element instead of the element we mean to scroll (`.edit-post-layout__content`), and because the body can't be scrolled, this is causing the issue.
    
    This PR fixes that.
    jasmussen committed Sep 28, 2018
    Configuration menu
    Copy the full SHA
    a14e50a View commit details
    Browse the repository at this point in the history