Skip to content

Conversation

dummdidumm
Copy link
Member

For some reason that escapes me Chrome ignores the scroll-margin-top property. It's possible to fix it using JS even though that's not ideal. fixes #273 (the logic is taken from #96 where it was removed)

This was a bit jumpy locally in dev mode at times (tested on the "Basic markup" page), let's see how it works when deployed.

If we don't find a better solution fast then I'd merge this anyway but keep the related issue open until we find a proper non-JS fix. This is still better than not scrolling the headers into view.

For some reason that escapes me Chrome ignores the `scroll-margin-top` property. It's possible to fix it using JS even thought that's not ideal. fixes #273
Copy link

vercel bot commented Oct 11, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
omnisite ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 11, 2024 2:09pm

@dummdidumm
Copy link
Member Author

it's visible on deployment too. example: jump between "events" and "attributes and props"

@Rich-Harris
Copy link
Member

you know i couldn't possibly rest until i'd solved this for real :) turns out overflow was the culprit. closing in favour of #346

@dummdidumm dummdidumm deleted the on-this-page-scroll branch October 11, 2024 21:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Headings don't respect scroll padding in Chrome

2 participants