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

[Safari] Links to named anchors jump past the element containing the anchor id #24

Closed
ashryanbeats opened this issue Sep 15, 2020 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@ashryanbeats
Copy link

Current

Currently, if I click the "Go live" link (/#go-live) seen in the top nav in the screenshot below, the scroll jumps past the "Go live" heading which contains the anchor id:

Screen Shot 2020-09-15 at 15 04 13

Desired

Preferably, we'd be able to see the heading after the scroll:

Screen Shot 2020-09-15 at 15 04 25


Note that the above is simply an example (I'm not totally sold we'll do this type of linking from top nav on the docs top page).

However, this phenomenon is present in more legitimate use cases for named anchors as well, like the autogenerated right-hand table-of-contents in narrative content.

Possible source of issue

My guess is that we need to account for the height taken up by the top-nav.

@icaraps
Copy link
Contributor

icaraps commented Sep 16, 2020

@ashryanbeats Is this bug persistent ? Does it occur every time (also for the table-of-contents) ? This should not occur with the 2.x release.

@ashryanbeats
Copy link
Author

It is persistent. I was on 2.0.0 when I report this, but I'm also seeing it in 2.1.3.

I'm on Safari 13.1.1.

@icaraps
Copy link
Contributor

icaraps commented Sep 24, 2020

Indeed I can reproduce it on Safari.

Chrome, Firefox, Edge are all fine. I'll look into it thanks !

@icaraps icaraps changed the title Links to named anchors jump past the element containing the anchor id [Safari] Links to named anchors jump past the element containing the anchor id Sep 24, 2020
@icaraps icaraps self-assigned this Sep 24, 2020
@icaraps icaraps added the bug Something isn't working label Sep 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants