

def onEventPreview(self, event):
    type = DOM.eventGetType(event)
    if (type == 'click'):
        target = DOM.eventGetTarget(event)
        parentMenuElement = self.item.getElement()
        if DOM.isOrHasChild(parentMenuElement, target):
            if self.item.onBrowserEvent(event):
                event.hide()
            return True
    return PopupPanel.onEventPreview(self, event)

dataset/ETHPy150Open anandology/pyjamas/library/gwt/ui/ContextMenuPopupPanel.py ContextMenuPopupPanel.onEventPreview/VarMisuse@73/98 `self`->`event`