mirror of https://github.com/axmolengine/axmol.git
Fix bug of returning UNKNOWN event for return type key SEARCH/SEND in EditBox for Android and SEARCH for iOS. (#18192)
This commit is contained in:
parent
d1a8e73be4
commit
d651298d3e
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue