Click outside or press Esc to close