mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-01-22 09:01:57 -05:00
Android: Fix if you leave input field with text in it then select it again, you can't backspace the text anymore
This commit is contained in:
parent
e93fa93042
commit
53af396dd9
1 changed files with 3 additions and 2 deletions
|
@ -399,8 +399,9 @@ public class MainActivity extends Activity implements SurfaceHolder.Callback2 {
|
|||
@Override
|
||||
public Editable getEditable() {
|
||||
if (!inited) {
|
||||
// otherwise random crashes later with backspacing
|
||||
Selection.setSelection(kbText, 0);
|
||||
// needed to set selection, otherwise random crashes later with backspacing
|
||||
// set selection to end, so backspacing after opening keyboard with text still works
|
||||
Selection.setSelection(kbText, kbText.toString().length());
|
||||
inited = true;
|
||||
}
|
||||
return kbText;
|
||||
|
|
Loading…
Reference in a new issue