mirror of https://github.com/axmolengine/axmol.git
[ci skip]EditBox::setText() may crash on some Android devices
This commit is contained in:
parent
78a167fec1
commit
0d37220beb
|
@ -335,7 +335,7 @@ public class Cocos2dxEditBoxHelper {
|
||||||
if (editBox != null) {
|
if (editBox != null) {
|
||||||
editBox.setChangedTextProgrammatically(true);
|
editBox.setChangedTextProgrammatically(true);
|
||||||
editBox.setText(text);
|
editBox.setText(text);
|
||||||
int position = text.length();
|
int position = editBox.getText().length();
|
||||||
editBox.setSelection(position);
|
editBox.setSelection(position);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue