| Summary: | createLink & unLink Command should not make anchor elements with same name attribute | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Ahmad Saleem <ahmad.saleem792> |
| Component: | HTML Editing | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW --- | ||
| Severity: | Normal | CC: | karlcow, rniwa, webkit-bug-importer, wenson_hsieh |
| Priority: | P2 | Keywords: | InRadar |
| Version: | Safari Technology Preview | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
|
Description
Ahmad Saleem
2022-12-07 05:56:28 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. (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. |