Bug 803995 - Dispatch an nsAsyncRollup event (that calls RollupFromList) only if we're dropped down since otherwise it might reset mouse capturing for other content. r=roc

This commit is contained in:
Mats Palmgren 2012-10-31 06:10:38 +01:00
Родитель d9d4cc8342
Коммит ecc9ccd0b4
1 изменённых файлов: 6 добавлений и 4 удалений

Просмотреть файл

@ -681,10 +681,12 @@ nsComboboxControlFrame::AbsolutelyPositionDropDown()
mLastDropDownBelowScreenY = nscoord_MIN;
GetAvailableDropdownSpace(&above, &below, &translation);
if (above <= 0 && below <= 0) {
if (IsDroppedDown()) {
// Hide the view immediately to minimize flicker.
nsIView* view = mDropdownFrame->GetView();
view->GetViewManager()->SetViewVisibility(view, nsViewVisibility_kHide);
NS_DispatchToCurrentThread(new nsAsyncRollup(this));
}
return eDropDownPositionSuppressed;
}