[website] Allow overscroll-behavior on embedded snack#687
Open
dmaixner93 wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
This PR addresses this issue raised in the React Native Website repository regarding the embedded snack's scroll behavior.
As I mentioned on the linked issue, this issue appears on Chromea and Firefox (and maybe Edge?) - but not on Safari.
How
Removed
overscroll-behavior: nonefrom thebodyelement. This allows the user to continue scrolling the page when they have scrolled to the end of the code block on an embedded snack. Alternatively, if we want to keep the CSS property we could change it tooverscroll-behavior: auto.Test Plan
The easiest way to test this feature is to go a page on the React Native website (i.e. https://reactnative.dev/docs/flatlist#example) with an embedded snack, inspect the snack, and remove
overscroll-behavior: nonefrom the body element inside the iframe. Once the CSS property is removed, scroll to the end of the code block on the embedded snack and continue scrolling - the page should scroll as expected.Here are some screen recordings showing before and after the property is removed.
Before

After
