Skip to content

Commit 4d338af

Browse files
committed
Merge pull request #1352 from domagojeklic/CCPlatformTextFieldiOS_Fix
CCPlatformTextFieldIOS fix
2 parents ec3ef6c + e2ae296 commit 4d338af

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

cocos2d-ui/Platform/iOS/CCPlatformTextFieldIOS.m

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,17 @@ - (void)keyboardWasShown:(NSNotification*)notification
177177
- (void) keyboardWillBeHidden:(NSNotification*) notification
178178
{
179179
_keyboardIsShown = NO;
180+
181+
BOOL focusOnTextField = _textField.isEditing;
182+
183+
#if __CC_PLATFORM_ANDROID
184+
focusOnTextField = _textFieldIsEditing;
185+
#endif
186+
187+
if (focusOnTextField)
188+
{
189+
[self endFocusingOnTextField];
190+
}
180191
}
181192

182193

0 commit comments

Comments
 (0)