Bug 597723. Mouse scrolling shouldn't dismiss panel notifications. r=enndeakin a=blocking-final

This commit is contained in:
Felipe Gomes 2011-01-19 19:21:38 -08:00
parent bb828dfbec
commit ed4c4bb19e

View File

@ -217,8 +217,19 @@ NS_IMETHODIMP nsXULPopupManager::ShouldRollupOnMouseWheelEvent(PRBool *aShouldRo
{
// should rollup only for autocomplete widgets
// XXXndeakin this should really be something the popup has more control over
*aShouldRollup = PR_FALSE;
nsMenuChainItem* item = GetTopVisibleMenu();
*aShouldRollup = (item && !item->Frame()->IsMenu());
if (!item)
return NS_OK;
nsIContent* content = item->Frame()->GetContent();
if (content) {
nsAutoString value;
content->GetAttr(kNameSpaceID_None, nsGkAtoms::type, value);
*aShouldRollup = StringBeginsWith(value, NS_LITERAL_STRING("autocomplete"));
}
return NS_OK;
}