Bug 256134 - Selecting a link and pasting plain text changes text in the link, but not the link href
Summary: Selecting a link and pasting plain text changes text in the link, but not the...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Wenson Hsieh
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-04-29 13:47 PDT by Wenson Hsieh
Modified: 2023-06-07 14:48 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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?