<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - selection.getRangeAt(0) should return a reference to the range, not a copy"
href="https://bugs.webkit.org/show_bug.cgi?id=145212">145212</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>selection.getRangeAt(0) should return a reference to the range, not a copy
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr>
<tr>
<th>Product</th>
<td>WebKit
</td>
</tr>
<tr>
<th>Version</th>
<td>528+ (Nightly build)
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Unspecified
</td>
</tr>
<tr>
<th>OS</th>
<td>Unspecified
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>Normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P2
</td>
</tr>
<tr>
<th>Component</th>
<td>HTML DOM
</td>
</tr>
<tr>
<th>Assignee</th>
<td>webkit-unassigned@lists.webkit.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>m.goleb+bugzilla@gmail.com
</td>
</tr></table>
<p>
<div>
<pre>Steps to reproduce the problem:
1. Select some text on any page.
2. Open DevTools, go to the console
3. Enter:
var selection = getSelection();
selection.getRangeAt(0) === selection.getRangeAt(0);
It returns false. The spec:
<a href="https://dvcs.w3.org/hg/editing/raw-file/tip/editing.html#dom-selection-getrangeat">https://dvcs.w3.org/hg/editing/raw-file/tip/editing.html#dom-selection-getrangeat</a>
is clear:
"it must return a reference to (not a copy of) the context object's range."
The same happens in Chrome; Firefox does the right thing.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>