WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
UNCONFIRMED
111580
execCommand("justifycenter") will remove classes and data- attributes, and use the elements computed style as an inline style
https://bugs.webkit.org/show_bug.cgi?id=111580
Summary
execCommand("justifycenter") will remove classes and data- attributes, and us...
Thomas Jones
Reported
2013-03-06 07:41:33 PST
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.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug