Bug 250320 - In-page link to text fragment does not update URL fragment
Summary: In-page link to text fragment does not update URL fragment
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: History (show other bugs)
Version: Safari 16
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-01-09 05:30 PST by Dan
Modified: 2023-01-16 05:31 PST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dan 2023-01-09 05:30:44 PST
Support for linking to text fragments was introduced in Safari 16.1. 

Clicking an in-page link to a text fragment, such as in the example below, does not update the URL with the new fragment:

<a href='#:~:text=hello%20world'>Go to: hello world</a>

I'm not sure if this works as intended, but it is in contrast to the behavior of other browsers (e.g. Firefox, Safari), which update the URL fragment. Also note that in Safari, right-clicking and opening the link in a separate tab does preserve the text fragment identifier in the URL.
Comment 1 Radar WebKit Bug Importer 2023-01-16 05:31:16 PST
<rdar://problem/104297224>