<!DOCTYPE html>
<html>
Test passes if it does not crash.
<textarea id="A"></textarea>
<textarea id="B"></textarea>
<script>
if (window.testRunner)
    testRunner.dumpAsText();

A.selectionStart = 0;
B.style.display = "none";
B.selectionStart = 0;
</script>
</html>
