Close the dialog box when the user presses the escape (ESC) key.