mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-06-18 15:15:21 +00:00
make sure selection start is before end
this should not be necessary according to documentation, but apparently there are apps (even by Google!) that can't deal with documented behavior see comments in GH-1512
This commit is contained in:
parent
e9e3bdac17
commit
f06a553d2c
1 changed files with 7 additions and 2 deletions
|
@ -716,8 +716,13 @@ public final class RichInputConnection implements PrivateCommandPerformer {
|
|||
if (start < 0 || end < 0) {
|
||||
return false;
|
||||
}
|
||||
mExpectedSelStart = start;
|
||||
mExpectedSelEnd = end;
|
||||
if (start > end) {
|
||||
mExpectedSelStart = end;
|
||||
mExpectedSelEnd = start;
|
||||
} else {
|
||||
mExpectedSelStart = start;
|
||||
mExpectedSelEnd = end;
|
||||
}
|
||||
if (isConnected()) {
|
||||
final boolean isIcValid = mIC.setSelection(start, end);
|
||||
if (!isIcValid) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue