Open
Description
Description
In the present day, all of the major browsers have support for what MDN refers to as text fragments, which allow linking to any location on a given page - regardless of whether that location has an associated <a name="">
element - by specifying particular text on that page.
The short of it is, text fragments don't work in DocC catalogs. This is presumably related to the implementation of src/mixins/onPageLoadScrollToFragment.js.
Checklist
- If possible, I've reproduced the issue using the
main
branch of this package. - This issue hasn't been addressed in an existing GitHub issue.
Expected Behavior
Navigating to a link pointing to DocC documentation which includes a text fragment should scroll to the first occurrence of that text on the page in question.
Actual behavior
The top of the page is displayed. If using Safari, the URL in the address bar is reset to have an empty fragment (e.g., just #
).
Steps To Reproduce
- Using any recent version of Safari, navigate to https://docs.swift.org/swift-book/documentation/the-swift-programming-language/attributes#:~:text=buildPartialBlock.