[Webkit-unassigned] [Bug 22025] range.deleteContents() does not collapse the selection

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Mar 16 17:38:34 PDT 2009


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


eric at webkit.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID




------- Comment #6 from eric at webkit.org  2009-03-16 17:38 PDT -------
I'm not sure that range.deleteContents() should modify the selection at all.

As you can see by this test:
<body>
<div id="test" contentEditable>a<span id="bspan">b</span>c</div>
<script>
var testDiv = document.getElementById("test");
var bspan = document.getElementById("bspan");
var sel = window.getSelection();
sel.selectAllChildren(testDiv);
bspan.parentNode.removeChild(bspan);
</script>
b was removed dynamically, but "ac" is still selected.
</body>


I don't think this is actually a bug, except in that our selection API is
different from mozilla's (and thus confusing).  We need to fix our selection
API, but "tied ranges" I don't think are the answer.


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