4 <style type=
"text/css">
5 div#overflow
{ margin: 5px; padding: 10px; border: medium solid
; width: 100px; height: 100px; overflow: auto
; }
6 ::selection
{ background-color: red
; }
8 <script type=
"text/javascript" src=
"resources/text-based-repaint.js"></script>
9 <script type=
"text/javascript">
10 function repaintTest()
12 getSelection().empty();
16 <body onload=
"runRepaintTest()">
18 Test for
<i><a href=
"http://bugs.webkit.org/show_bug.cgi?id=12590">http://bugs.webkit.org/show_bug.cgi?id=
12590</a>
19 REGRESSION: Text selection is weird in textareas in Trac wiki editing pages
</i>.
22 <div style=
"height: 100px;"></div>
23 <span id=
"target">Lorem
<br>ipsum
</span>
25 <script type=
"text/javascript">
26 var overflow
= document
.getElementById("overflow");
27 overflow
.scrollTop
= overflow
.scrollHeight
;
28 var selection
= getSelection();
29 var target
= document
.getElementById("target");
30 selection
.setBaseAndExtent(target
, 0, target
, 3);