JSFiddle - React, Tailwind, and code Playground
HTML
<button onclick="ExtendSelection ()">Click to reproduce the error</button>
<a >
<span>
<div>
<select>
<option>CopyTo:</option>
<option>Headnote</option>
<option>Synopsis</option>
<option>Statute</option>
</select>
</div>
</span>
</a>
<a >
<span>Pages: 8 - 8</span>
</a>
<a>
<span>testlaw</span>
</a>
<input>
JavaScript
function ExtendSelection() {
var sel;
if (document.body.createTextRange) { // Internet Explorer
var range = document.body.createTextRange();
range.moveStart('character', 0);
range.collapse(true);
range.moveStart('character', 29); //causes an exception
//range.moveStart('character', 30);//No exception
range.moveEnd('character', 177);
range.select();
alert(range.text);
} else {
alert("Your browser does not support this example!");
}
}