We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1c97e41 commit cdfc781Copy full SHA for cdfc781
cocos/ui/UIEditBox/iOS/CCUIEditBoxIOS.mm
@@ -389,6 +389,12 @@ - (BOOL)textViewShouldEndEditing:(UITextView *)textView
389
390
- (BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text
391
{
392
+ if ( self.keyboardReturnType == cocos2d::ui::EditBox::KeyboardReturnType::DONE &&
393
+ [text isEqualToString: @"\n"] )
394
+ {
395
+ [self closeKeyboard];
396
+ }
397
+
398
int maxLength = getEditBoxImplIOS()->getMaxLength();
399
if (maxLength < 0)
400
0 commit comments