-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Fix: Correct the navigation to anchor #17910
Conversation
2ee3914
to
657ae6e
Compare
657ae6e
to
bb16919
Compare
Another solution would be to add a |
Thanks, that seems to be working fine. I left one suggestion. I was wondering whether we could do something to not remove this part or URL, if user wants to link to specific section, but let's leave that for future work. |
Thank you for your feedback @Florian3k, yes I was wondering too,indeed it can be useful. I can take a look at it for another PR. |
The browser compatibility of [`location.hash`](https://developer.mozilla.org/en-US/docs/Web/API/Location/hash) seems to be out of date. That's why in this fix, I suggest using [`history.replaceState`](https://developer.mozilla.org/en-US/docs/Web/API/History/replaceState). ## Before: https://github.com/lampepfl/dotty/assets/44496264/a1399b0b-e4e8-4754-b146-661b59a01824 ## After: https://github.com/lampepfl/dotty/assets/44496264/22f38852-0cc5-48eb-a6e7-699f11628401 Fixes: #17182 [Cherry-picked 7694985]
Backports #17910 to the LTS branch. PR submitted by the release tooling. [skip ci]
The browser compatibility of
location.hash
seems to be out of date. That's why in this fix, I suggest usinghistory.replaceState
.Before:
Screen.Recording.2023-06-06.at.10.12.13.mov
After:
Screen.Recording.2023-06-06.at.13.46.20.mov
Fixes: #17182