I’m using a component in a cairngorm PopupWrapper. I want to listen to the KeyboardEvent.KEY_DOWn event on the component but it doesn’t seem to be dispatching it. Is it because it’s in PopupWrapper? Is there anyway I can get it to dispatch the event?
<fx:Declaration>
<cairngorm:PopupWrapper>
<mx:UIComponent keyDown="keyDownHandler()" />
</cairngorm:PopupWrapper>
</fx:Declaration>
I figured it out.
PopupWrapper only adds FocusManager to the component if it implements IFocusManagerContainer. My component was extending SkinnableComponent thus did not receive any focus. So I made my component extend from SkinnableContainer instead. I also had to manually set focus to my component on “opened” event. Now keyDown is dispatched as expected.