зеркало из https://github.com/mozilla/gecko-dev.git
Bug 868327 - Only allow the drop-down menu to open above the combobox if there is room for it, otherwise open it below even though it doesn't fit. r=roc
This commit is contained in:
Родитель
6f8b642629
Коммит
cde517b135
|
@ -646,9 +646,10 @@ nsComboboxControlFrame::AbsolutelyPositionDropDown()
|
|||
return eDropDownPositionPendingResize;
|
||||
}
|
||||
|
||||
// Position the drop-down below if there is room, otherwise place it
|
||||
// on the side that has more room.
|
||||
bool b = dropdownSize.height <= below || below >= above;
|
||||
// Position the drop-down below if there is room, otherwise place it above
|
||||
// if there is room. If there is no room for it on either side then place
|
||||
// it below (to avoid overlapping UI like the URL bar).
|
||||
bool b = dropdownSize.height <= below || dropdownSize.height > above;
|
||||
nsPoint dropdownPosition(0, b ? GetRect().height : -dropdownSize.height);
|
||||
if (StyleVisibility()->mDirection == NS_STYLE_DIRECTION_RTL) {
|
||||
// Align the right edge of the drop-down with the right edge of the control.
|
||||
|
|
Загрузка…
Ссылка в новой задаче