Close keyboard before redirecting