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

--HG--
extra : commitid : zbwmIObuaT
extra : rebase_source : 9670ce6066a7daecc850e788c4ca72d2f1fbd1e9
extra : amend_source : 527852122ba938e40dfc8ce74804daec9485b994
This commit is contained in:
Gijs Kruitbosch 2015-08-17 13:43:28 +01:00
parent 5f9c6c0d4e
commit 60c46f11cf

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.