WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
91783
execCommand copies the backgroung-color of the enclosing element to the element being edited.
https://bugs.webkit.org/show_bug.cgi?id=91783
Summary
execCommand copies the backgroung-color of the enclosing element to the eleme...
Ryosuke Niwa
Reported
2012-07-19 14:18:43 PDT
What steps will reproduce the problem? 1. Open a blank/any page. 2. Open the developer tool console. 3. Execute the following JS from the console: var body = document.getElementsByTagName('body')[0]; body.contentEditable = true; body.style['cssText'] = 'background-color: white;'; 4. Now type some text into the page. (e.g aaa) 5. select the text typed in 4. 6. from the js console: document.execCommand('insertUnorderedList'); What is the expected result? body.innerHTML should give "<ul><li>aaa</li></ul>" What happens instead? body.innerHTML gives "<ul><li><span style="background-color: white; ">aaa</span></li></ul>" Please provide any additional information below. Attach a screenshot if possible. It can also be reproduced with other commands e.g insertOrderedList.
Attachments
Patch
(5.03 KB, patch)
2012-07-27 05:01 PDT
,
Sukolsak Sakshuwong
no flags
Details
Formatted Diff
Diff
Patch
(4.94 KB, patch)
2012-07-27 13:07 PDT
,
Sukolsak Sakshuwong
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Ryosuke Niwa
Comment 1
2012-07-19 14:18:55 PDT
http://crbug.com/137466
Sukolsak Sakshuwong
Comment 2
2012-07-27 05:01:24 PDT
Created
attachment 154908
[details]
Patch
Ryosuke Niwa
Comment 3
2012-07-27 11:15:37 PDT
Comment on
attachment 154908
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=154908&action=review
The code change looks right.
> LayoutTests/editing/style/redundant-background-color.html:6 > +<script src="../../resources/testharness.js"></script> > +<script src="../../resources/testharnessreport.js"></script>
We don't normally use testharness.js for webkit regression tests. Use dump-as-markup.js in LayoutTests/resources/ instead.
Sukolsak Sakshuwong
Comment 4
2012-07-27 13:07:23 PDT
Created
attachment 155033
[details]
Patch
WebKit Review Bot
Comment 5
2012-07-27 17:32:31 PDT
Comment on
attachment 155033
[details]
Patch Clearing flags on attachment: 155033 Committed
r123940
: <
http://trac.webkit.org/changeset/123940
>
WebKit Review Bot
Comment 6
2012-07-27 17:32:35 PDT
All reviewed patches have been landed. Closing bug.
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