Commit 765d8bea01f0fd432b65e491528303cecf5616c2

Sam Lantinga 2016-10-01T12:46:36

Fixed bug 3305 - Fixed TextInput status when the keyboard was dismissed with the dismiss key on the iPad Diego The keyboard on iPads has a dismiss button that hides the keyboard. When the keyboard was hidden using that button, instead of the return key, SDL was still reporting IsTextInputActive as true. This patch adds an extra SDL_StopTextInput when iOS reports the keyboard will hide.

1
2
3
4
5
6
7
8
9
10
11
12
diff --git a/src/video/uikit/SDL_uikitviewcontroller.m b/src/video/uikit/SDL_uikitviewcontroller.m
index 7f08ef3..e6e903e 100644
--- a/src/video/uikit/SDL_uikitviewcontroller.m
+++ b/src/video/uikit/SDL_uikitviewcontroller.m
@@ -251,6 +251,7 @@ SDL_AppleTVControllerUIHintChanged(void *userdata, const char *name, const char 
 
 - (void)keyboardWillHide:(NSNotification *)notification
 {
+    SDL_StopTextInput();
     [self setKeyboardHeight:0];
 }