Bug 1106824 - Don't consume the event that closed the combobox dropdown on Windows. r=enndeakin

This commit is contained in:
Mats Palmgren 2014-12-04 21:26:25 +00:00
parent 90bf960813
commit cda2dfeb71

View File

@ -1394,19 +1394,24 @@ nsComboboxControlFrame::SetInitialChildList(ChildListID aListID,
bool
nsComboboxControlFrame::Rollup(uint32_t aCount, const nsIntPoint* pos, nsIContent** aLastRolledUp)
{
if (!mDroppedDown)
if (!mDroppedDown) {
return false;
}
bool consume = true;
#ifdef XP_WIN
consume = false;
#endif
nsWeakFrame weakFrame(this);
mListControlFrame->AboutToRollup(); // might destroy us
if (!weakFrame.IsAlive())
return true;
if (!weakFrame.IsAlive()) {
return consume;
}
ShowDropDown(false); // might destroy us
if (weakFrame.IsAlive()) {
mListControlFrame->CaptureMouseEvents(false);
}
return true;
return consume;
}
nsIWidget*