Bug 111580
| Summary: | execCommand("justifycenter") will remove classes and data- attributes, and use the elements computed style as an inline style | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Thomas Jones <tomprogramming> |
| Component: | HTML Editing | Assignee: | Nobody <webkit-unassigned> |
| Status: | UNCONFIRMED | ||
| Severity: | Major | ||
| Priority: | P2 | ||
| Version: | 528+ (Nightly build) | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| URL: | http://jsfiddle.net/tomprogramming/mV9E4/ | ||
Thomas Jones
This is an issue with commandidentifiers justifycenter, justifyleft (when the content is not by default left-justified), justifyright, justifyfull, insertorderedlist, and insertunorderedlist
Repro: http://jsfiddle.net/tomprogramming/mV9E4/
If you make a selection containing the first line (level1) and apply "justifycenter" to it, the class of level1 goes away, along with any data- attributes on the element, and the computed style of the element is inlined in the style attribute.
If an element is already wrapped inside a <div> tag, this does not occur, but the first element inside a contenteditable tag seems to never be wrapped in a div. If you delete everything in the editable box and start typing, the tags that appear (if any) is just either a text node, or a <span>.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |