The current spec takes a snapshotted scroll offset of the anchor element.
When the anchor has position:sticky and is stuck, this offset no longer matches the actual offset of the anchor element. Then both position-fallback and anchor-scroll fail.
Test case (by @jh3y): https://codepen.io/web-dot-dev/pen/dyqbqjE/8b6fc20f812f33ba4920620bb9af3604
Edit: there's another case when we have an anchor-scrolled container with sticky positioned content
Test case: https://jsfiddle.net/p7nfqyzw/
The tooltip should be stuck when hitting the top of the viewport, but currently it doesn't.
The current spec takes a snapshotted scroll offset of the anchor element.
When the anchor has
position:stickyand is stuck, this offset no longer matches the actual offset of the anchor element. Then bothposition-fallbackandanchor-scrollfail.Test case (by @jh3y): https://codepen.io/web-dot-dev/pen/dyqbqjE/8b6fc20f812f33ba4920620bb9af3604
Edit: there's another case when we have an anchor-scrolled container with sticky positioned content
Test case: https://jsfiddle.net/p7nfqyzw/
The tooltip should be stuck when hitting the top of the viewport, but currently it doesn't.