close menu if main pane is clicked