Hide popups when escape is pressed
Close popups when clicking outside the popup.