Fix problem with oncontextmenu in popupMenu