[Webkit-unassigned] [Bug 81656] Backspace/delete produces combined font/span from existing inline elements

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu May 24 11:42:31 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=81656





--- Comment #5 from Ryosuke Niwa <rniwa at webkit.org>  2012-05-24 11:41:35 PST ---
(In reply to comment #2)
> Testing at <http://aryeh.name/tmp/editing/autoimplementation.html#delete> with input '<p><span style="font-size: large">1[]</span></p>', I find the spec says to produce:
> 
>   <p><span style="font-size: large">{}<br></span></p>
> 
> which is as requested.  Firefox 14.0a1 seems to remove the tag entirely in the second case, which is a bug.

Firefox's behavior makes more sense. The thing is, we have to remove the span if the user moves the caret elsewhere and bring it back since that should reset the style. And it's very undesirable to leave spans like this when the user moved the caret elsewhere because the span is going to linger around in the markup and slowly bloats the HTML over time.

> In summary, I think this bug is legitimate, and WebKit should match the spec.  Whatever code removes the empty tags here should come after the code that adds a <br> -- then by the time it checks whether the <span>/<b>/etc. is empty, it won't be, because it will have a <br> in it.

While I do agree that merging span with font is bad, I don't think we should be leaving span behind. The spec needs to change here.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list