NEW 248870
createLink & unLink Command should not make anchor elements with same name attribute
https://bugs.webkit.org/show_bug.cgi?id=248870
Summary createLink & unLink Command should not make anchor elements with same name at...
Ahmad Saleem
Reported 2022-12-07 05:56:28 PST
Hi Team, While going through Blink's comment, I came across another potential which can be merged: Blink Commit - https://src.chromium.org/viewvc/blink?view=revision&revision=185635 Webkit GitHub Source - https://github.com/WebKit/WebKit/blob/4cc6515988ce049468e3c05836107192648b037a/Source/WebCore/editing/ApplyStyleCommand.cpp#LL1074 Failing Tests (also Fail in Firefox Nightly 109) - https://jsfiddle.net/6rftoakp/show Appreciate if someone can give input whether matching Chrome behavior is desirable or not? Thanks!
Attachments
Ryosuke Niwa
Comment 1 2022-12-07 16:25:31 PST
The patch is oddly specific about name content attribute of anchor element. There are other elements with name attribute. Why are we not considering those? Also, there is nothing wrong with multiple elements to have the same name so I'm not certain if we want to remove name attribute.
Ahmad Saleem
Comment 2 2022-12-09 02:23:06 PST
(In reply to Ryosuke Niwa from comment #1) > The patch is oddly specific about name content attribute of anchor element. > There are other elements with name attribute. Why are we not considering > those? Also, there is nothing wrong with multiple elements to have the same > name so I'm not certain if we want to remove name attribute. I think you are right and if I go through Chrome Bug history, it seems that it was impacting "editing-in-js" library effort of trying to move "execCommand" to JS. Link - https://github.com/yosinch/editing/issues/35 Plus Safari works like this: > JSFiddle - https://jsfiddle.net/c4817ys2/ > Apply - document.execCommand("createLink", false, "URL"); *** Safari 16.1 & Firefox Nightly 109 *** True *** Chrome Canary 110 *** First run nothing and then second will show "true" similar to Safari & Firefox.
Radar WebKit Bug Importer
Comment 3 2022-12-14 05:57:16 PST
Note You need to log in before you can comment on or make changes to this bug.