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

Disable smooth scrolling when opening/closing Dialog components on iOS #2635

Merged
merged 4 commits into from
Aug 2, 2023

Commits on Aug 2, 2023

  1. disable smooth scrolling when opening/closing Dialogs

    For iOS workaround related purposes we have to capture the scroll
    position and offset the margin top with that amount and then
    `scrollTo(0,0,)` to prevent all kinds of funny UI jumps.
    
    However, if you have `scroll-behavior: smooth` enabled on your `html`,
    then offseting the margin-top and later `scrollTo(0,0)` would be
    handled in a smooth way, which means that the actual position would be
    off.
    
    To solve this, we disable smooth scrolling entirely in order to make the
    position of the Dialog correct. This shouldn't be a problem in practice
    since the page itself isn't suppose to scroll anyway.
    
    Once the Dialog closes we reset it such that everything else keeps
    working as expected in a (smooth) way.
    RobinMalfait committed Aug 2, 2023
    Configuration menu
    Copy the full SHA
    beb0c4e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c94d654 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    555c0fc View commit details
    Browse the repository at this point in the history
  4. update changelog

    RobinMalfait committed Aug 2, 2023
    Configuration menu
    Copy the full SHA
    3735db2 View commit details
    Browse the repository at this point in the history