I have an ItemRenderer that contains an image and a custom component that extends the Text component. The subclassed text component always requires two clicks to activate the context menu. The first click can be either a left- or right-click. The image functions properly and activates the context menu on the first right-click.
I've tried setting focus on the custom component, capturing mouse clicks, and setting the priority of the context menu addevent listener so that it takes precedence, none of which work.
This is a "legacy" project that uses Flex 3.6a SDK.
Is this a problem with subclassing the Text component?
I haven't found the answer, but I found that if I change my custom component to a Label instead of Text, the right-click context menu appears on the first click, like normal.
I'd appreciate it if someone could explain why the Text vs. Label components behave differently in this regard.
Try setting selectable=false on the Text component ( assuming you don’t need selection for copy/paste)
Thank you; that worked.