RESOLVED FIXED 16661
REGRESSION (r27369): Paste text into a contenteditable div creates a contenteditable div for each line
https://bugs.webkit.org/show_bug.cgi?id=16661
Summary REGRESSION (r27369): Paste text into a contenteditable div creates a contente...
Peer Bremer
Reported 2007-12-29 00:44:25 PST
Since this weeks webkit builds pasting plain text form a text editor such as bbedit with line endings \n Creates a new content editable div for each line. Example pasting: Test Test Test into a div with contenteditable set to true now creates this inside the div: <div contenteditable="true"> <div contenteditable="true">Test</div><div contenteditable="true"><br class="webkit-block-placeholder"></div><div contenteditable="true">Test</div><div contenteditable="true"><br class="webkit-block-placeholder"></div><div contenteditable="true">Test</div> </div> instead of the desired: <div contenteditable="true"> <div>Test</div><div><br class="webkit-block-placeholder"></div><div>Test</div><div><br class="webkit-block-placeholder"></div><div>Test</div> </div>
Attachments
Test case (127 bytes, text/html)
2007-12-30 00:17 PST, David Kilzer (:ddkilzer)
no flags
David Kilzer (:ddkilzer)
Comment 1 2007-12-30 00:02:36 PST
Confirmed with a local debug build of WebKit r29032 with Safari 3.0.4 (523.12.2) on Mac OS X 10.4.11 (8S165).
David Kilzer (:ddkilzer)
Comment 2 2007-12-30 00:04:32 PST
The bisect-builds script reports: Works: r27337 Fails: r27373
David Kilzer (:ddkilzer)
Comment 3 2007-12-30 00:13:37 PST
The internal autospade script reports: Works: r27366 Fails: r27369 The only likely candidate is r27369: http://trac.webkit.org/projects/webkit/changeset/27369
David Kilzer (:ddkilzer)
Comment 4 2007-12-30 00:17:46 PST
Created attachment 18179 [details] Test case * STEPS TO REPRODUCE 1. Launch Safari/WebKit. 2. Open test case (this attachment). 3. Launch BBEdit. 4. Type "Test" followed by the Enter key three times in a new BBEdit document. 5. Select all text. 6. Copy (Cmd-C). 7. Switch to Safari/WebKit. 8. Click in contenteditable div (above the "Test" button). 9. Paste (Cmd-V). 10. Click the "Test" button. * EXPECTED RESULTS There should only be one <div> with contenteditable="true". * ACTUAL RESULTS Each new line with "Test" text is a <div> with contenteditable="true". * REGRESSION This is a regression from shipping Safari 3.0.4 on Mac OS X 10.4.11.
David Kilzer (:ddkilzer)
Comment 5 2007-12-30 00:19:26 PST
(In reply to comment #4) > * ACTUAL RESULTS > Each new line with "Test" text is a <div> with contenteditable="true". This copies the "id" attribute as well of the parent <div>, which is also incorrect.
David Kilzer (:ddkilzer)
Comment 6 2007-12-30 00:20:05 PST
Note You need to log in before you can comment on or make changes to this bug.