зеркало из https://github.com/mozilla/gecko-dev.git
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
This commit is contained in:
Родитель
e7e62f956e
Коммит
bb5f71a7f4
|
@ -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;
|
||||
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);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче