Bug 330428, nsDOMEvent::InitEvent doesn't clear the target r+sr=bz

This commit is contained in:
Olli.Pettay%helsinki.fi 2006-03-14 21:51:56 +00:00
parent a789dec260
commit 9774964f6e

View File

@ -494,6 +494,11 @@ nsDOMEvent::InitEvent(const nsAString& aEventTypeArg, PRBool aCanBubbleArg, PRBo
mEvent->flags |= NS_EVENT_FLAG_CANT_CANCEL;
}
// Clearing the old targets, so that the event is targeted correctly when
// re-dispatching it.
mEvent->target = nsnull;
mEvent->originalTarget = nsnull;
// Unset the NS_EVENT_FLAG_STOP_DISPATCH_IMMEDIATELY bit (which is
// set at the end of event dispatch) so that this event can be
// dispatched.