Close panel on click