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

Use the newly proposed scroll-boundary-behavior for amp-sidebar, amp-lightbox #10623

Closed
aghassemi opened this issue Jul 25, 2017 · 13 comments
Closed
Labels
Component: amp-lightbox P2: Soon Stale Inactive for one year or more Type: Bug Type: UX issues impacting end user experience WG: components
Milestone

Comments

@aghassemi
Copy link
Contributor

Proposed CSS standard scroll-boundary-behavior allows developers to decide the browser's behavior once a scroller has reached its full extent.

When launched, we should use it on amp-sidebar and amp-lightbox to prevent overscrolling of the parent body (using contain)

https://www.chromestatus.com/feature/5734614437986304
w3c/csswg-drafts#769
https://groups.google.com/a/chromium.org/forum/#!msg/blink-dev/txdySyr-mb0/tPQJZvJiBw
https://wicg.github.io/scroll-boundary-behavior/AJ

/cc @dvoytenko

@aghassemi
Copy link
Contributor Author

/cc @cramforce: places we can use this in AMP

@cramforce
Copy link
Member

CC @dvoytenko

@dvoytenko
Copy link
Contributor

We should just do it.

@rudygalfi
Copy link
Contributor

Rolling forward to H2 October milestone. Please correct if needed.

@cathyxz
Copy link
Contributor

cathyxz commented Aug 23, 2018

This is good in Chrome and Edge, but not implemented in Safari.

@dvoytenko
Copy link
Contributor

@cathyxz Have we deployed this though?

@cathyxz
Copy link
Contributor

cathyxz commented Aug 25, 2018

Nope, sorry. I meant that the scroll-boundary-behavior attribute lives in Chrome, but not Safari in case we want to implement it.

@jridgewell
Copy link
Contributor

Re: b/118645457. In the meantime, can we fix this behavior for scrollable lightbox? Something similar to the 1px scrollTop hack we do for iOS embed viewport.

@aghassemi
Copy link
Contributor Author

@jridgewell We do that already https://github.com/ampproject/amphtml/blob/master/extensions/amp-lightbox/0.1/amp-lightbox.js#L482 b/118645457 happens regardless of scrollable lightbox.

@jridgewell
Copy link
Contributor

You're only applying it in scrolling-up direction. You need to apply it to the scrolling-down direction, too.

@aghassemi
Copy link
Contributor Author

@jridgewell Runtime doesn't do the bottom either

// Unfortunately, the same is very expensive to do on the bottom, due to
because it is expensive to do. Probably fine for lightbox though. I will give it a try

@stale
Copy link

stale bot commented Dec 18, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Stale Inactive for one year or more label Dec 18, 2021
@stale stale bot closed this as completed Dec 25, 2021
@katsar0v
Copy link

katsar0v commented Jun 9, 2024

Any update?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: amp-lightbox P2: Soon Stale Inactive for one year or more Type: Bug Type: UX issues impacting end user experience WG: components
Projects
None yet
Development

No branches or pull requests

9 participants