[Webkit-unassigned] [Bug 72236] New: startContainer is wrong for a range selection over a table

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Nov 13 20:49:14 PST 2011


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

           Summary: startContainer is wrong for a range selection over a
                    table
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Macintosh Intel
        OS/Version: Mac OS X 10.6
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: HTML DOM
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: andrew_raphael_small at yahoo.com


Load the following in webkit r100094 or iOS 5.0 or Safari 5.1.1 or Chrome 15.0.874.120

<html>
<head>
<script type='text/javascript'>
function alertRangeStart() {
var start = window.getSelection().getRangeAt(0).startContainer;
alert("start of range should be table but is "+start);
}
</script>
</head>
<body>
<p>don't select this.</p>
<table>
  <tr>
    <td>select this</td>
  </tr>
</table>
<input type='button' onclick='alertRangeStart()' value='Range Start'>
</body>
</html>

Then with the mouse (or a tap in iOS) select the whole table that includes the text "select this".  Make sure that the selection goes into the left margin a bit so that it is including the table and not just the text.  The call to start container returns html element and not table as I would expect. Note that the start offset is 0 as would be expected if the range was over the table.

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