mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-25 14:17:22 +00:00
start with first element selected (recent regression)
This commit is contained in:
parent
e78988cd16
commit
2bf15cbf44
@ -75,14 +75,17 @@ function selectDialogOnLoad() {
|
||||
|
||||
listBox = document.getElementById("list");
|
||||
var numItems = param.GetInt( 2 )
|
||||
var firstItem, nextItem;
|
||||
|
||||
for ( i = 2; i <= numItems+1; i++ ) {
|
||||
var newString = param.GetString( i );
|
||||
dump("setting string "+newString+"\n");
|
||||
AppendStringToTreelist(listBox, newString);
|
||||
nextItem = AppendStringToTreelist(listBox, newString);
|
||||
if (i == 2) {
|
||||
firstItem = nextItem;
|
||||
}
|
||||
}
|
||||
dump("number of items "+ listBox.options.length +" "+listBox.length+"\n");
|
||||
listBox.selectedIndex = 0;
|
||||
listBox.selectItem(firstItem);
|
||||
|
||||
// resize the window to the content
|
||||
window.sizeToContent();
|
||||
|
Loading…
x
Reference in New Issue
Block a user