Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

[POC] trust in chrome to do scroll anchoring #1787

Closed
wants to merge 1 commit into from

Conversation

lukebarnard1
Copy link
Contributor

This does not exactly work because it fails when we're at the very top of the page and back paginating. It does however work very very well when paginating whilst the viewport is half-way down the timeline window or whilst at the very bottom.

Removing spinners doesn't seem to have any effect.

In theory the anchor selection algorithm chrome uses is selecting an element that React decides to turn into a totally new element. There is currently no planned mechanism to prevent some elements from being used as anchors.

Chome is also the only browser to support this

See https://drafts.csswg.org/css-scroll-anchoring/

This does not exactly work because it fails when we're at the very top of the page and back paginating. It does however work very very well when paginating whilst the viewport is half-way down the timeline window or whilst at the very bottom.

Removing spinners doesn't seem to have any effect.

In theory the anchor selection algorithm chrome uses is selecting an element that React decides to turn into a totally new element. There is currently no planned mechanism to prevent some elements from being used as anchors.

Chome is also the only browser to support this

See https://drafts.csswg.org/css-scroll-anchoring/
@lukebarnard1
Copy link
Contributor Author

The decision with this (as it was in Dec '17) is that we're not taking this route until all browsers support scroll anchors and there exists a way to have some elements deliberately jumpy (i.e. the spinners).

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

Successfully merging this pull request may close these issues.

1 participant