cancel edit mode if click outside grid