Bug 258257

Summary: Design mode: elements lose the attribute contenteditable when dragged
Product: WebKit Reporter: Ahmad Saleem <ahmad.saleem792>
Component: HTML EditingAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: rniwa, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: Safari Technology Preview   
Hardware: Unspecified   
OS: Unspecified   
URL: https://jsbin.com/vuladoz/edit?html,css,output

Description Ahmad Saleem 2023-06-17 18:02:22 PDT
Hi Team,

We were failing linked (in URL) field test case, where if we cut / paste the elements with styling in 'contenteditable=false', it will lose styling.

It is potential candidate to merge but would like to get input, whether it is intentional or not but Firefox and Chrome works.

Blink Commit: https://chromium.googlesource.com/chromium/src.git/+/92c26eed9fd8834e1da3283e8bd45952aa4f0d6b

WebKit Source: https://searchfox.org/wubkat/source/Source/WebCore/editing/ReplaceSelectionCommand.cpp#711

^ Changing this to below:

if (element->parentNode() && element->parentNode()->hasRichlyEditableStyle() && element->hasRichlyEditableStyle())

It make us passing linked (in URL) test case while STP172 fails it.

@Ryosuke - any input? Should we merge it?

Thanks!
Comment 1 Radar WebKit Bug Importer 2023-06-24 18:03:14 PDT
<rdar://problem/111272573>