diff --git a/layout/xul/base/src/nsXULPopupManager.cpp b/layout/xul/base/src/nsXULPopupManager.cpp index 12ee4e619f1..4f17070d7d0 100644 --- a/layout/xul/base/src/nsXULPopupManager.cpp +++ b/layout/xul/base/src/nsXULPopupManager.cpp @@ -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; }