add esc in dialog