check isPopupTrigger on mousePressed and mouseReleased for
cross-platform functionality