close dialog with esc key