зеркало из https://github.com/mozilla/pjs.git
Bug 597723. Mouse scrolling shouldn't dismiss panel notifications. r=enndeakin a=blocking-final
This commit is contained in:
Родитель
5236911265
Коммит
fda83a7b52
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче