Clicking outside the header closes the header