Bug 1088637 - check we get the right transition event, r=Enn

This commit is contained in:
Gijs Kruitbosch 2015-08-17 13:43:28 +01:00
parent 2481c87114
commit 80e8233e2d

View File

@ -360,6 +360,13 @@ NS_IMETHODIMP nsXULPopupShownEvent::Run()
NS_IMETHODIMP nsXULPopupShownEvent::HandleEvent(nsIDOMEvent* aEvent)
{
nsMenuPopupFrame* popup = do_QueryFrame(mPopup->GetPrimaryFrame());
nsCOMPtr<nsIDOMEventTarget> eventTarget;
aEvent->GetTarget(getter_AddRefs(eventTarget));
// Ignore events not targeted at the popup itself (ie targeted at
// descendants):
if (!SameCOMIdentity(mPopup, eventTarget)) {
return NS_OK;
}
if (popup) {
// ResetPopupShownDispatcher will delete the reference to this, so keep
// another one until Run is finished.