Hide the keyboard if needed before displaying the modal view