mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-05 02:52:39 +08:00
Merge pull request #1399 from knoxHuang/v1.9-release
fix EditBox updateDomTextCases bug for fireball/issues/7919
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user