Fixed a keyboard hiding issue when a modal view is displayed