Created attachment 120168 [details] Table inside Body(contentEditable=true) We are proving an online editor for text. In this we have an option to include a table. For this we made body as editable by putting contentEditable="true". While putting the table inside that body and drag drop any text is misplacing the text. Reproducible Steps: 1. Open http://elrte.org/demo 2. Delete whole content in editable area 3. Add text "sample" 4. Insert a table of 3*3 size 5. Drag and drop text("sample") into column(0,0) Expected behavior: Should paste the content in the column(0,0) What happen instead: It is pasting in the next column Please find the attached simple test page to reproduce the same
Created attachment 139655 [details] reduction attempt (please modify path to dump-as-markup.js) Here's my attempt to reproduce this bug in DRT. I can't get it to work unfortunately :(
Created attachment 139658 [details] DRT test (modify path to dump-as-markup.js) finally, this one works
Created attachment 139669 [details] Fixes the bug
Comment on attachment 139669 [details] Fixes the bug View in context: https://bugs.webkit.org/attachment.cgi?id=139669&action=review > Source/WebCore/editing/ReplaceSelectionCommand.cpp:892 > + if (m_preventNesting && startBlock && !isTableCell(startBlock) && !startIsInsideMailBlockquote) { What about text that’s inside a <tr> but not an actual table cell and other non-table-cell cases that are otherwise similar to table cells in this respect?
Comment on attachment 139669 [details] Fixes the bug View in context: https://bugs.webkit.org/attachment.cgi?id=139669&action=review >> Source/WebCore/editing/ReplaceSelectionCommand.cpp:892 >> + if (m_preventNesting && startBlock && !isTableCell(startBlock) && !startIsInsideMailBlockquote) { > > What about text that’s inside a <tr> but not an actual table cell and other non-table-cell cases that are otherwise similar to table cells in this respect? We can address those cases in a separate bug I suppose. Please file a bug if you have a specific case in mind. FWIW, isTableCell checks the renderer for table-cellness.
Comment on attachment 139669 [details] Fixes the bug Clearing flags on attachment: 139669 Committed r115869: <http://trac.webkit.org/changeset/115869>
All reviewed patches have been landed. Closing bug.