Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Adobe AIR Development

Posts: 58
Registered: ‎02-13-2009
My Device: Not Specified

How to prevent ContextMenu from appearing if long pressed on the section header in a section list

Hi, I have a section list. Is there a way to prevent context menu from appearing if long pressed on the header.


I can determine based on the long pressed item that it is the header and so using the listener 


list.addEventListener(ContextMenuEvent.OPENING, contextMenuOpening);


I could prevent the context menu from appearing using event.preventDefault which makes the context menu not to appear but this has some serios side effects because what is happening is the ContextMenu stops appearing in the other sections of the app.


Do you know what might be happening here and how to undo that event.preventDefault did so the ContextMenu  resumes its default behavior. Is there alternative you can suggest as opposed to event.PreventDefault so I can stop the ContextMenu from appearing if long pressed on the Headers of the SectionList.


Thank You.