mirror of
https://github.com/2009scape/2009Scape-mobile.git
synced 2025-12-18 04:20:11 -07:00
Fix replace(0...-1) crash on some software keyboards
This commit is contained in:
parent
3ebc632cde
commit
3395b43c91
1 changed files with 9 additions and 1 deletions
|
|
@ -71,8 +71,16 @@ class MinecraftInputConnection extends BaseInputConnection {
|
|||
}
|
||||
|
||||
public boolean commitText(CharSequence text, int newCursorPosition) {
|
||||
parent.sendKeyPress(text.charAt(0));
|
||||
//parent.sendKeyPress(text.charAt(0));
|
||||
for(int i = 0; i < text.length(); i++) parent.sendKeyPress(text.charAt(i));
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean deleteSurroundingText(int beforeLength, int afterLength) {
|
||||
for(int i = 0; i < beforeLength; i++) {
|
||||
parent.sendKeyPress(LWJGLGLFWKeycode.GLFW_KEY_BACKSPACE);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue