-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Following code is opening a popup menu when right clicking a row (say row #5). Good so far.
However when I click somewhere else on the page and click (NOT RIGHT CLICK), on the same row (row #5), it shows the popup menu again. But I am not right clicking. I am simply clicking the row.
How do I remove the opened menu once I click somewhere else so that this does not happen?
listItem.addEventListener(Events.ON_RIGHT_CLICK, new EventListener<Event>() {
public void onEvent(Event event) throws Exception {
XulElement xulElement = (XulElement) event.getTarget();
Popup popup = (Popup) SH.getPopup("myPopup");
xulElement.setPopup(popup);
popup.setPage(xulElement.getPage());
popup.open(xulElement);
}
});
try not calling the popup.setPage. This only need to be set when its attached to a root component, otherwise its inherited.
Asked: 2013-12-30 04:09:15 +0800
Seen: 6 times
Last updated: Jan 21 '14