open dialog (and close it with escape key)