blob: 60a639ceaf31bacc6e8607d4f48334714b013eaa [file] [log] [blame]
<html>
<head>
<title>Highlighting a selected image in scrolled block</title>
<script type="text/javascript">
function test()
{
var t = document.getElementById('target');
window.getSelection().setBaseAndExtent(t.childNodes[0],58,t.childNodes[2],11);
t.scrollTop = 40;
}
</script>
</head>
<body onload="test()">
<p>
This tests for a regression against <i><a href="http://bugzilla.opendarwin.org/show_bug.cgi?id=6673">http://bugzilla.opendarwin.org/show_bug.cgi?id=6673</a>
Selection highlight doesn't scroll along with an image contained in an overflow:scroll block</i>.
</p>
<p>
There should be one contiguous highlight from &ldquo;elit&rdquo; to &ldquo;Etiam&rdquo;,
including the orange square, and no other highlighted areas.
</p>
<hr>
<div id="target" style="overflow: auto; width: 100px; height: 200px;">
Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
<img src="data:image/gif;base64,R0lGODlhCgAKAIAAAP/MAAAAACH5BAAAAAAALAAAAAAKAAoAAAIIhI+py+0PYysAOw==">
Etiam et ipsum. Nam consectetuer mi eget velit.
Sed nec risus vitae felis auctor ultricies. Pellentesque
aliquet...
</div>
</body>