[Webkit-unassigned] [Bug 62047] New: copy-paste breaks lists

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jun 3 13:30:46 PDT 2011


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

           Summary: copy-paste breaks lists
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Unspecified
        OS/Version: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: HTML Editing
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: ojan at chromium.org
                CC: adele at apple.com, evan at chromium.org, rniwa at webkit.org,
                    enrica at apple.com, leviw at chromium.org


1. Load http://simple-rte.rniwa.com/?editor=%3Cdiv%3E%0A%3Cdiv%3E%0A%3Cul%20style%3D%22text-align%3Aright%3B%22%3E%3Cli%3EA%3C/li%3E%3C/ul%3E%0A%3Cdiv%3E%0A%20%20%20%20%3Cul%3E%0A%20%20%20%20%20%20%20%20%3Cli%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3Ca%20href%3D%22%22%3EB%3C/a%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3Cbr%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20C%20%0A%20%20%20%20%20%20%20%20%3C/li%3E%0A%20%20%20%20%3C/ul%3E%0A%3C/div%3E%0A%3C/div%3E%0A%3C/div%3E&script=editor%28%29.focus%28%29%3B
2. Select all (e.g. cmd+a)
3. Copy
4. Paste

I'd expect the html contents to be unmodified. Instead, the HTML changes considerably and the visual formatting is totally different.

HTML before:
<div>
<div>
<ul style="text-align:right;"><li>A</li></ul>
<div>
    <ul>
        <li>
            <a href="">B</a>
            <br>
            C 
        </li>
    </ul>
</div>
</div>
</div>

HTML after:
<div>
<div>
<ul style="text-align:right;"><li><meta charset="utf-8"><ul style="text-align: right; "><li>A</li></ul><div><ul><li><a href="http://simple-rte.rniwa.com/?editor=%3Cdiv%20id%3D%22root%22%20style%3D%22word-wrap%3A%20break-word%3B%20-khtml-nbsp-mode%3A%20space%3B%20-khtml-line-break%3A%20after-white-space%3B%22%20contenteditable%3D%22%22%3E%0A%3Cdiv%20id%3D%22test%22%20class%3D%22editing%22%3E%0A%3Cul%20style%3D%22text-align%3Aright%3B%22%3E%3Cli%3E%3Cmeta%20charset%3D%22utf-8%22%3E%3Cul%20style%3D%22text-align%3A%20right%3B%20%22%3E%3Cli%3EA%3C/li%3E%3C/ul%3E%3Cdiv%3E%3Cul%3E%3Cli%3E%3Ca%20href%3D%22http%3A//simple-rte.rniwa.com/%3Feditor%3D%253Cul%253E%253Cli%253Ehello%253C/li%253E%253Cli%253Eworld%253C/li%253E%253C/ul%253E%253Cdiv%253EWebKit%253C/div%253E%26amp%3Bscript%3Deditor%2528%2529.focus%2528%2529%253B%22%3EB%3C/a%3E%26nbsp%3B%3Cbr%3EC%3C/li%3E%3C/ul%3E%3C/div%3E%3C/li%3E%3C/ul%3E%3Cdiv%3E%3Cul%3E%0A%20%20%20%20%3C/ul%3E%0A%3C/div%3E%0A%3C/div%3E%0A%3C/div%3E&scrip
 t=editor%28%29.focus%28%29%3B">B</a> <br>C</li></ul></div></li></ul><div><ul>
    </ul>
</div>
</div>
</div>

I see a few problems with this:
1. The structure of the list items has changed resulting in all the text being right aligned and some bullets being nested.
2. Why is there a meta tag??
3. Why do we resolve the href instead of leaving it as an empty string?

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