Merge pull request #1399 from knoxHuang/v1.9-release

fix EditBox updateDomTextCases bug for fireball/issues/7919
This commit is contained in:
Jare Guo
2018-07-23 11:30:36 +08:00
committed by GitHub
@@ -324,11 +324,17 @@ public class Cocos2dxEditBox extends EditText {
}
private String updateDomTextCases (final String text) {
if (text.length() <= 0) {
return text;
}
String newText = text;
switch (this.mInputFlagConstraints) {
case InputType.TYPE_TEXT_FLAG_CAP_SENTENCES:
char[] charArray = text.toCharArray();
charArray[0] -= 32;
char firstChar = charArray[0];
if (Character.isLowerCase(firstChar)) {
charArray[0] -= 32;
}
newText = String.valueOf(charArray);
break;
case InputType.TYPE_TEXT_FLAG_CAP_WORDS: