mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 05:41:12 +00:00
Bug 531075: Don't allow ourselves to reopen popups that are already in the open-popup chain. r=bz
This commit is contained in:
parent
cf468b0bee
commit
6ed52fe387
@ -1218,6 +1218,12 @@ nsXULPopupManager::GetVisiblePopups()
|
||||
PRBool
|
||||
nsXULPopupManager::MayShowPopup(nsMenuPopupFrame* aPopup)
|
||||
{
|
||||
// Don't show popups that we already have in our popup chain
|
||||
if (IsPopupOpen(aPopup->GetContent())) {
|
||||
NS_WARNING("Refusing to show duplicate popup");
|
||||
return PR_FALSE;
|
||||
}
|
||||
|
||||
// if a popup's IsOpen method returns true, then the popup must always be in
|
||||
// the popup chain scanned in IsPopupOpen.
|
||||
NS_ASSERTION(!aPopup->IsOpen() || IsPopupOpen(aPopup->GetContent()),
|
||||
|
Loading…
Reference in New Issue
Block a user