Changed the implementation of hideSoftKeyboard()