1
0
Fork 0

fixed scrolling the punctuation, then switching to emoji, breaking the first emoji

This commit is contained in:
sspanak 2024-02-27 15:24:38 +02:00 committed by Dimo Karaivanov
parent 28c95665c3
commit 1ef576e941

View file

@ -701,6 +701,9 @@ public class TraditionalT9 extends KeyPadHandler {
private void setComposingTextWithHighlightedStem(@NonNull String word) {
if (appHacks.setComposingTextWithHighlightedStem(word)) {
Logger.w("highlightComposingText", "Defective text field detected! Text highlighting disabled.");
} else if (word.isEmpty() || !Character.isLetterOrDigit(word.charAt(0))) {
// Leave emoji and special characters alone. Adding bold or italic breaks them.
textField.setComposingText(word);
} else {
textField.setComposingTextWithHighlightedStem(word, mInputMode);
}