blob: c0e1291a45a7146780e838849bf482d8d036dd4a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
<html>
<head>
<script>
function test() {
if (window.testRunner)
testRunner.waitUntilDone();
setTimeout('addLongOption();', 100);
}
function addLongOption()
{
var newOpt = document.createElement("option");
newOpt.appendChild(document.createTextNode("I require more room"));
var sl = document.getElementById("t");
sl.appendChild(newOpt);
if (window.testRunner)
testRunner.notifyDone();
}
</script>
</head>
<body onload="test()">
This tests that when an option is dynamically added to a menu list, and it is too long for the current width,<br>
that the select automatically recalculates the correct width.<br>
<select id="t">
<option id="short">Short</option>
<option id="medium">Medium</option>
</select>
<div id="res"></div>
</body>
</html>
|