clicking on background closes the popup