Prevent default on popup events