WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
24167
Second paragraph is converted from em to px when applying bullets
https://bugs.webkit.org/show_bug.cgi?id=24167
Summary
Second paragraph is converted from em to px when applying bullets
Robby Walker
Reported
2009-02-25 11:51:22 PST
Start with the following HTML: <div style="font-size: 1.3em">1</div><div style="font-size: 1.1em">2</div> Select all and add bullets. Observe the HTML is now: <div style="font-size: 1.3em"><ul><li>1</li><li><span class="Apple-style-span" style="font-size: 18px; ">2</span></li></ul></div><div style="font-size: 1.1em">2</div> It is especially strange that the first LI stays in em but the second converts to px. (This is the root cause of a bug in Google Presentations.)
Attachments
Add attachment
proposed patch, testcase, etc.
Eric Seidel (no email)
Comment 1
2009-02-25 12:27:28 PST
Would be ideal to turn this into a self-contained test case attached to this bug.
Aryeh Gregor
Comment 2
2011-08-19 12:46:33 PDT
IE9 and Opera 11.50 produce <ul><li><div style="font-size: 1.3em">1</div></li><li><div style="font-size: 1.1em">2</div></li></ul> Firefox 7.0a2 produces <ul><li>1</li><li>2</li></ul> so it strips the style. My spec produces <ul><li style="font-size: 1.3em">1</li><li style="font-size: 1.1em">2</li></ul> which IMO is the best. :) Basically I have an explicit step in the insert(un)orderedlist algorithm where if we're indenting a div or p, we convert it to an li, preserving all its attributes:
http://aryeh.name/spec/editing/editing.html#toggling-lists
Self-contained test case (who needs attachments?): data:text/html,<!doctype html> <div contenteditable> <div style="font-size: 1.3em">1</div> <div style="font-size: 1.1em">2</div> </div> <script> getSelection().selectAllChildren(document.querySelector("div")); document.execCommand("insertunorderedlist", false, ""); document.body.textContent = document.querySelector("div").innerHTML; </script>
Ahmad Saleem
Comment 3
2022-12-01 15:18:16 PST
Changed the test case from
Comment 02
into JSFiddle and added to URL: *** Safari 16.1 *** <div style="font-size: 1.3em"><ul><li><span style="font-size: 1.3em;">1</span><br></li><li><span style="font-size: 1.1em;">2</span><br></li></ul></div> *** Chrome Canary 110 *** <div style="font-size: 1.3em"><ul><li>1</li><li>2</li></ul></div> *** Firefox Nightly 109 *** <ul><li>1 </li><li>2</li></ul> _______ Just wanted to share updated test result. Thanks!
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