Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
Adobe Flex SDK Previous
-
None
-
None
-
Affected OS(s): All OS Platforms
Affected OS(s): All OS Platforms
Language Found: Japanese
Description
Steps to reproduce:
1. Regist context menu on root application which handled event that showing Alert. (ContextMenuEvent.MENU_SELECT, MENU_ITME_SELECT both can reproduce this issue.)
2. AddChild Video component to root application which attaches Camera.
3. Right click over Video component appears context menu which registed, but event is not dispatched when the item clicked. Right click where the Video component is not placed, event dispatched correctly.
Actual Results:
Event handler not working.
Expected Results:
Event handler works.
Workaround (if any):
The simple source written in bellow.
<?xml version="1.0" encoding="utf-8"?>
<mx:Application
xmlns:mx="http://www.adobe.com/2006/mxml"
creationComplete="init()"
layout="absolute"
>
<mx:Script>
<![CDATA[
import mx.containers.Box;
import mx.core.UIComponent;
import mx.controls.Alert;
private function init():void
{ var item:ContextMenuItem = new ContextMenuItem("test"); item.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, itemSelectHandler); var menu:ContextMenu = new ContextMenu(); menu.hideBuiltInItems(); menu.customItems.push(item); menu.addEventListener(ContextMenuEvent.MENU_SELECT, menuSelectHandler); contextMenu = menu; var video:Video = new Video(); video.attachCamera(Camera.getCamera()); var container:UIComponent = new UIComponent(); container.addChild(video); box.addChild(container); }private function itemSelectHandler(e:ContextMenuEvent):void
{ Alert.show("item selected!"); }private function menuSelectHandler(e:ContextMenuEvent):void
{ Alert.show("menu selected!"); } ]]
>
</mx:Script>
<mx:Box id="box" width="100%" height="100%" verticalAlign="middle" horizontalAlign="center" />
</mx:Application>