[Webkit-unassigned] [Bug 19701] Select All + Delete doesn't delete all the content in a contentEditable region

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Apr 8 13:34:27 PDT 2009


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


ojan at chromium.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |eric at webkit.org




------- Comment #8 from ojan at chromium.org  2009-04-08 13:34 PDT -------
Ugh. This is another area where position normalizing bites us. In this test,
delete/replace should leave the LI, but if the whole contents of the DIV is
selected (e.g. the range's start is set to div,0 and end is set to div,1),
which is what select-all should do, then it should not leave the LI. But with
position normalizing, we can't distinguish between those selections at the time
of the delete.

For reference, here's the contents of editing/inserting/4875189-1.html:
<p>This tests for a bug when replacing the contents of a list.  The list
shouldn't be removed, just its contents.</p>
<div contenteditable="true"><ul><li id="li">You shouldn't see
this.</li></ul></div>

<script>
var r = document.createRange();
var li = document.getElementById("li");
r.setStart(li, 0);
r.setEnd(li, li.childNodes.length);
var selection = window.getSelection();
selection.addRange(r);
document.execCommand("InsertHTML", false, "This should be in a list item.")
</script>


-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list