[Webkit-unassigned] [Bug 35364] New: Delete should not merge past table boundaries

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Feb 24 15:06:17 PST 2010


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

           Summary: Delete should not merge past table boundaries
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: PC
        OS/Version: Mac OS X 10.5
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: HTML Editing
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: jparent at google.com
                CC: tony at chromium.org, ojan at chromium.org,
                    rolandsteiner at chromium.org


Repro steps:
1. Inside a contentEditable region, select starting inside a table cell, and
ending in an inline or block past the table cell.
2. Hit backspace/delete

Result:
Selected contents are deleted, contents of non-selected part of inline/block
are merged into the table cell.

Expected Result:
Selected contents are deleted, but the table cell boundary is treated like an
editable root, and no merge occurs.  This is what Word, TextEdit, and Firefox
all do (IE has very strange behavior - it doesn't even perform a delete of any
sort, and just collapses the selection).

webkit only demo (you'll need to hit "eval JS now" button to execute the js
that does the select + delete):
http://www.plexode.com/cgi-bin/eval3.py#ht=%3Cdiv%20contentEditable%20id%3D'edit'%3E%3Ctable%20id%3D'table'%20border%3D1%3E%3Ctr%3E%3Ctd%3E1%3C%2Ftd%3E%3Ctd%3E2%3C%2Ftd%3E%3C%2Ftr%3E%3Ctr%3E%3Ctd%3E3%3C%2Ftd%3E%3Ctd%20id%3D'cell'%3Elast%20table%20cell%3C%2Ftd%3E%3C%2Ftr%3E%3C%2Ftable%3E%3Cb%20id%3D'inline'%3Einline%20after%20table%3C%2Fb%3E%3C%2Fdiv%3E&ohh=1&ohj=0&jt=edit.focus()%3B%0Avar%20sel%20%3D%20window.getSelection()%3B%0Avar%20rng%20%3D%20sel.getRangeAt(0)%3B%0A%2F%2F%20Select%20starting%20inside%20the%20last%20table%20cell%0Arng.setStart(cell.firstChild%2C%203)%3B%0A%2F%2F%20End%20selection%20inside%20inline%20after%20table%20cell%0Arng.setEnd(inline.firstChild%2C%203)%3B%0Asel.removeAllRanges()%3B%0Asel.addRange(rng)%3B%0A%0A%2F%2F%20Delete%20the%20selected%20contents%0Adocument.execCommand('Delete')&ojh=0&ojj=0&ms=100&oth=0&otj=0&cex=1

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