Bug 250320

Summary: In-page link to text fragment does not update URL fragment
Product: WebKit Reporter: Dan <dan>
Component: HistoryAssignee: Nobody <webkit-unassigned>
Status: NEW    
Severity: Normal CC: megan_gardner, thorton, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: Safari 16   
Hardware: Unspecified   
OS: Unspecified   

Dan
Reported 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.
Attachments
Radar WebKit Bug Importer
Comment 1 2023-01-16 05:31:16 PST
Note You need to log in before you can comment on or make changes to this bug.