Chrome Version : 7.0.517.24 (Official Build 60738) beta URLs (if applicable) : Other browsers tested: Add OK or FAIL after other browsers where you have tested this issue: Safari 5.0.1 (5533.17.8): FAIL Firefox 3.6.10: OK IE 7: OK IE 8: OK What steps will reproduce the problem? 1. Create a content editable table with several cells. 2. Place the cursor after the last character in a non-empty cell. 3. Paste some text What is the expected result? The text be pasted as the last item in the current cell. What happens instead? The text is pasted as the first item in the next cell. Please provide any additional information below. Attach a screenshot if possible. Here is the HTML I used to reproduce this: <html> <body> <div contenteditable="true"> <table> <tr> <td>1</td><td>2</td> </tr> <tr> <td>3</td><td>4</td> </tr> </table> </div> </body> </html>
I can't reproduce this with Chrome 10.0.648.18 dev nor Safari 5.0.3. It helps to add a border to the table so you can tell which cell you're in, tho I've validated that this has no affect on the ability to reproduce the bug.
Created attachment 85212 [details] demo
(In reply to comment #2) > Created an attachment (id=85212) [details] > demo I can see where this test case goes wrong, as the position is interpreted as being after the first child of the table element. Can you reproduce this the way the reporter said? Even putting "1" inside a non-content editable span, while it breaks the caret position, doesn't insert or paste content into the wrong location.
(In reply to comment #3) > (In reply to comment #2) > > Created an attachment (id=85212) [details] [details] > > demo > > I can see where this test case goes wrong, as the position is interpreted as being after the first child of the table element. Can you reproduce this the way the reporter said? Even putting "1" inside a non-content editable span, while it breaks the caret position, doesn't insert or paste content into the wrong location. You need to paste HTML. If you just insert plain text, then the content is inserted in the first cell as expected.
(In reply to comment #4) > You need to paste HTML. If you just insert plain text, then the content is inserted in the first cell as expected. That repros perfectly, thanks :)
I can reproduce it in Google Chrome 13.0.782.220 m and in Safari 5.1(7534.50), which are webkit 535.1 and 534.5 respectively.
Created attachment 143956 [details] Patch
This bug has been fixed. I added a test to make sure that it won't regress.
Comment on attachment 143956 [details] Patch Attachment 143956 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/12803344 New failing tests: editing/pasteboard/paste-into-table-cell-2.html
Created attachment 143958 [details] Archive of layout-test-results from ec2-cr-linux-04 The attached test failures were seen while running run-webkit-tests on the chromium-ews. Bot: ec2-cr-linux-04 Port: <class 'webkitpy.common.config.ports.ChromiumXVFBPort'> Platform: Linux-2.6.35-28-virtual-x86_64-with-Ubuntu-10.10-maverick
Created attachment 144104 [details] Patch
Comment on attachment 144104 [details] Patch Clearing flags on attachment: 144104 Committed r118561: <http://trac.webkit.org/changeset/118561>
All reviewed patches have been landed. Closing bug.
Does anyone know the revision number where this bug was fixed, or failing that, the affected source files? This bug item only seems to contain details about the regression test.
Nevermind, I found the relevant bug (https://bugs.webkit.org/show_bug.cgi?id=75004).