[Webkit-unassigned] [Bug 91783] New: execCommand copies the backgroung-color of the enclosing element to the element being edited.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jul 19 14:18:43 PDT 2012


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

           Summary: execCommand copies the backgroung-color of the
                    enclosing element to the element being edited.
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Unspecified
        OS/Version: Unspecified
            Status: NEW
          Keywords: InChromiumBugs, NeedsRadar
          Severity: Normal
          Priority: P2
         Component: HTML Editing
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: rniwa at webkit.org
                CC: darin at apple.com, ap at webkit.org, enrica at apple.com


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.

-- 
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