defensive on no selection
listen to esc and close events