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 fastboot compatibility and add smoke test #429

Closed
wants to merge 2 commits into from

Conversation

nickschot
Copy link
Owner

Unfortunately the body-scroll-lock library that we use only checks typeof window === 'undefined' before trying to add event listeners. In Fastboot this is not the case, yet addEventListener is not available.

Apart from adding a smoke test for fastboot support, this fixes fastboot compatibility by dynamically importing body-scroll-lock in non-fastboot environments.

Soon we will be able to migrate to https://developer.mozilla.org/en-US/docs/Web/CSS/overscroll-behavior once Safari 16 gets released/adopted and get rid of the library altogether.

@nickschot nickschot added the enhancement New feature or request label Sep 9, 2022
@nickschot
Copy link
Owner Author

Closing, followup in #891 and #854

@nickschot nickschot closed this Feb 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant