Don't compare the displayed value against the "selected index" in dropped down mode since that is actually the "hovered index". b=313260 r+sr=bzbarsky
git-svn-id: svn://10.0.0.236/trunk@182769 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -1214,7 +1214,14 @@ nsComboboxControlFrame::Reflow(nsPresContext* aPresContext,
|
||||
// Make sure the displayed text is the same as the selected option, bug 297389.
|
||||
PRInt32 selectedIndex;
|
||||
nsAutoString selectedOptionText;
|
||||
mListControlFrame->GetSelectedIndex(&selectedIndex);
|
||||
if (!mDroppedDown) {
|
||||
mListControlFrame->GetSelectedIndex(&selectedIndex);
|
||||
}
|
||||
else {
|
||||
// In dropped down mode the "selected index" is the hovered menu item,
|
||||
// we want the last selected item which is |mDisplayedIndex| in this case.
|
||||
selectedIndex = mDisplayedIndex;
|
||||
}
|
||||
if (selectedIndex != -1) {
|
||||
mListControlFrame->GetOptionText(selectedIndex, selectedOptionText);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user