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: added missing CSS unit when positioning the window offset to top #253

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Commits on May 4, 2022

  1. Configuration menu
    Copy the full SHA
    6235144 View commit details
    Browse the repository at this point in the history

Commits on Oct 20, 2022

  1. fix: Target window.top.document.body; remove code for adjusting viewp…

    …ort changes (#2)
    
    1. Change the target to document.body ➡️ window.top.document.body. (In non-iframe situations window.top resolves to window.) This is because in certain situations we might want to invoke the body scroll lock while inside of an iframe and want to make sure locking extends beyond the iframe.
    
    2. Remove the code that adjusts for viewport changes. While debugging this library I found that this passage of code that attempts to adjust for viewport changes did not work (it was causing the top value to be unset, meaning scroll position was not preserved). I don't think that it ought to be the responsibility of this library to adjust for viewport changes; it should just be to apply a body scroll lock. If they need to, consumers can adjust by listening to changes in visualViewport or using the new CSS display viewport dimensions.
    pbt committed Oct 20, 2022
    Configuration menu
    Copy the full SHA
    557beee View commit details
    Browse the repository at this point in the history