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

[css-anchor-1] Should anchor-scroll take overscroll into account? #8971

Closed
xiaochengh opened this issue Jun 15, 2023 · 3 comments
Closed

[css-anchor-1] Should anchor-scroll take overscroll into account? #8971

xiaochengh opened this issue Jun 15, 2023 · 3 comments

Comments

@xiaochengh
Copy link
Contributor

See this demo: https://charistheo.github.io/html-popovers/

If we scroll to the bottom and overscroll, then the popovers are detached from their anchors

This is because the popovers are position-fixed, and are attached to the anchors with anchor-scroll. When the page is overscrolled, the overscroll offset isn't included into the snapshotted scroll offset, so the popovers don't overscroll with the rest of the page.

Should this be fixed?

@xiaochengh
Copy link
Contributor Author

Hmm wait, is overscroll bouncing specified in CSS, or is it just UA-specific?

@tabatkins
Copy link
Member

The concept of overscroll is specified in CSS https://drafts.csswg.org/css-overscroll/, but exactly what happens when you overscroll (aka what the "local boundary default action" is, to use the spec's term) is intentionally unspecified because platforms differ and don't want to standardize.

Impls should be consistent with their scrolling APIs, but we shouldn't (currently, at least) specify what that behavior is. So we should at minimum be consistent with whatever stickypos does in the impl, and ideally with what Scroll Animations does too. But I don't think we need to specify anything in this spec.

@tabatkins
Copy link
Member

@flackr points out that #6299 (comment) is a resolution that stuck stickypos elements shouldn't rubberband with the scroller's contents (they should "stay stuck"). Chrome doesn't implement it yet, but when we do we should match up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants