mirror of
https://gitlab.futo.org/keyboard/latinime.git
synced 2024-09-28 14:54:30 +01:00
Merge "Backward compatibility hack : send delete when empty."
This commit is contained in:
commit
5e09958056
@ -973,7 +973,13 @@ public final class InputLogic {
|
|||||||
} else {
|
} else {
|
||||||
final int codePointBeforeCursor = mConnection.getCodePointBeforeCursor();
|
final int codePointBeforeCursor = mConnection.getCodePointBeforeCursor();
|
||||||
if (codePointBeforeCursor == Constants.NOT_A_CODE) {
|
if (codePointBeforeCursor == Constants.NOT_A_CODE) {
|
||||||
// Nothing to delete before the cursor.
|
// HACK for backward compatibility with broken apps that haven't realized
|
||||||
|
// yet that hardware keyboards are not the only way of inputting text.
|
||||||
|
// Nothing to delete before the cursor. We should not do anything, but many
|
||||||
|
// broken apps expect something to happen in this case so that they can
|
||||||
|
// catch it and have their broken interface react. If you need the keyboard
|
||||||
|
// to do this, you're doing it wrong -- please fix your app.
|
||||||
|
mConnection.deleteSurroundingText(1, 0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
final int lengthToDelete =
|
final int lengthToDelete =
|
||||||
|
Loading…
x
Reference in New Issue
Block a user