It's been awhile, but I finally had a chance to look at this. Yes,
Thomas, the problem is in DOMImplSafari's implementation of
selectGetOptions().
For my workaround, when I need an OPTGROUP, I use code I linked to
earlier. However, use the ListBox, I have to make some changes in
ListBox.getItemCount() and ListBox.getValue(int):
SelectElement select = listbox.getElement().cast();
int optCount = select.getElementsByTagName("option").getLength();
for (int i=0; i < optCount; i++) {
OptionElement option =
select.getElementsByTagName("option").getItem(i).cast();
}
This works in Safari 5, Firefox 3.6, and IE8/7/6 (IE6 tested with
IE8's Developer Tools and Quirks mode).