diff --git a/cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxEditBoxHelper.java b/cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxEditBoxHelper.java index 24acb3c3e1..8aac1138ef 100644 --- a/cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxEditBoxHelper.java +++ b/cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxEditBoxHelper.java @@ -204,7 +204,8 @@ public class Cocos2dxEditBoxHelper { editBox.endAction = Cocos2dxEditBox.kEndActionNext; Cocos2dxEditBoxHelper.closeKeyboardOnUiThread(index); return true; - } else if (actionId == EditorInfo.IME_ACTION_DONE) { + } else if (actionId == EditorInfo.IME_ACTION_DONE || actionId == EditorInfo.IME_ACTION_SEND || actionId == EditorInfo.IME_ACTION_SEARCH) { + editBox.endAction = Cocos2dxEditBox.kEndActionReturn; Cocos2dxEditBoxHelper.closeKeyboardOnUiThread(index); } return false; diff --git a/cocos/ui/UIEditBox/iOS/CCUIEditBoxIOS.mm b/cocos/ui/UIEditBox/iOS/CCUIEditBoxIOS.mm index 3146fbac73..a7393ad4cd 100644 --- a/cocos/ui/UIEditBox/iOS/CCUIEditBoxIOS.mm +++ b/cocos/ui/UIEditBox/iOS/CCUIEditBoxIOS.mm @@ -293,7 +293,8 @@ if (self.keyboardReturnType == cocos2d::ui::EditBox::KeyboardReturnType::NEXT) { action = cocos2d::ui::EditBoxDelegate::EditBoxEndAction::TAB_TO_NEXT; } else if (self.keyboardReturnType == cocos2d::ui::EditBox::KeyboardReturnType::GO || - self.keyboardReturnType == cocos2d::ui::EditBox::KeyboardReturnType::SEND) { + self.keyboardReturnType == cocos2d::ui::EditBox::KeyboardReturnType::SEND || + self.keyboardReturnType == cocos2d::ui::EditBox::KeyboardReturnType::SEARCH) { action = cocos2d::ui::EditBoxDelegate::EditBoxEndAction::RETURN; } }