Bug 256134

Summary: Selecting a link and pasting plain text changes text in the link, but not the link href
Product: WebKit Reporter: Wenson Hsieh <wenson_hsieh>
Component: HTML EditingAssignee: Wenson Hsieh <wenson_hsieh>
Status: RESOLVED FIXED    
Severity: Normal CC: twisniewski, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Description Wenson Hsieh 2023-04-29 13:47:08 PDT
This can lead to misleading behaviors — for instance:

1. Let's suppose there's an editable element with a link `<a href="https://www.apple.com">www.apple.com</a>`.
2. Copy the plain text "webkit.org"
3. Select the editable link and paste.

Observed: the hyperlink persists with the same href ("https://www.apple.com"), but with the new text content "webkit.org"
Expected: either remove the hyperlink entirely (i.e. just the plain text "webkit.org"), or somehow replace the href of the link with "http://webkit.org".
Comment 1 Wenson Hsieh 2023-04-29 13:47:17 PDT
rdar://16950226
Comment 2 Wenson Hsieh 2023-04-29 14:24:03 PDT
Pull request: https://github.com/WebKit/WebKit/pull/13309
Comment 3 EWS 2023-04-30 08:09:24 PDT
Committed 263539@main (2c273978ff63): <https://commits.webkit.org/263539@main>

Reviewed commits have been landed. Closing PR #13309 and removing active labels.
Comment 4 Thomas Wisniewski [:twisniewski] 2023-06-07 14:48:38 PDT
Do we know if Blink has a bug on file to match this behavior?