Changed the global click handler so that menu closing can happen from anywhere.