✨ [bento][amp-sidebar] Prevent scrolling in background of sidebar#32400
Merged
krdwan merged 4 commits intoampproject:masterfrom Feb 17, 2021
Merged
✨ [bento][amp-sidebar] Prevent scrolling in background of sidebar#32400krdwan merged 4 commits intoampproject:masterfrom
krdwan merged 4 commits intoampproject:masterfrom
Conversation
krdwan
commented
Feb 3, 2021
krdwan
commented
Feb 3, 2021
caroqliu
reviewed
Feb 4, 2021
23 tasks
caroqliu
reviewed
Feb 11, 2021
caroqliu
approved these changes
Feb 11, 2021
0af0d92 to
668033d
Compare
dvoytenko
approved these changes
Feb 16, 2021
668033d to
8fd2388
Compare
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.
Sidebar tracker: #31366
Important Note: This PR represents a workaround to ensure overscroll-behavior works properly. The workaround includes adding a large element as the child of the backdrop to force the scroll behavior on backdrop. A bug has been filed with the chrome team here: https://bugs.chromium.org/p/chromium/issues/detail?id=1176733
Once the bug has been fixed in ALL MAJOR BROWSERS, the following fix should be implemented:
overscroll-behaviortononeandoverflowtoscrollon both backdrop and sidebar elements. Expected behavior is that the background does not scroll when scrolling on the sidebar or backdrop elements.When inside of the sidebar or the backdrop of the sidebar, scrolling up and down should not cause the underlying content (behind the sidebar and backdrop to scroll up and down).
Covers the following use cases:
How it works:
overscroll-behavior: noneso that any scrolls on the child element do no propagate out of the backdrop.overscroll-behavior: noneonly works when the element actually has scroll behavior.overflow: autoso scroll bar will show up only when there is enough content to scroll.