createPopupMenu only showing on right click?

I figured it out. In the documentation, theres a comment about this - https://docs.inductiveautomation.com/display/DOC/system.gui.createPopupMenu

If you give menu.show an (x,y) coordinate it will show up on both left and right clicks.

menu.show(event, x, y)

So changing it to menu.show(event, event.x, event.y) made it work as intended.

6 Likes