hide keyboard before dismissing modal view.