preventDefault won't stop the other handlers from getting the event, it just 
warns them not to do what they'd normally do, and they can ignore and do stuff 
anyway.  And if the event isn't cancelable, preventDefault has no effect.  But 
that won't change the order in which the handlers get called.  You either have 
to change the order in which the handlers get added or use the priority 
parameter of addEventListener to affect the order.

Alex Harui
Flex SDK Developer
Adobe Systems Inc.<http://www.adobe.com/>
Blog: http://blogs.adobe.com/aharui

From: [email protected] [mailto:[email protected]] On Behalf 
Of k_navroz
Sent: Friday, September 25, 2009 11:06 AM
To: [email protected]
Subject: [flexcoders] Any way to make default event handler execute before my 
custom event handler?



Hi everyone,

I am using a third-party MDI framework which has default event handlers for 
many window events. The problem is I want my custom code to execute in response 
to few window events but only after the default handler defined by the 
framework has been executed because otherwise some of my changes get overriden 
by the framework's default event handlers.

I don't want to use preventDefault() because I also want those default event 
handlers to execute.

Thanks...

Reply via email to