From 76990814e170947f206d5910d312b7477ad735e6 Mon Sep 17 00:00:00 2001 From: Helium314 Date: Tue, 7 Jan 2025 17:20:49 +0100 Subject: [PATCH] only trigger fix for #994 when we have an alphabet keyboard fixes #1268 --- .../main/java/helium314/keyboard/keyboard/PointerTracker.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/helium314/keyboard/keyboard/PointerTracker.java b/app/src/main/java/helium314/keyboard/keyboard/PointerTracker.java index e9f9c68e9..21ea03f30 100644 --- a/app/src/main/java/helium314/keyboard/keyboard/PointerTracker.java +++ b/app/src/main/java/helium314/keyboard/keyboard/PointerTracker.java @@ -1048,10 +1048,11 @@ public final class PointerTracker implements PointerTrackerQueue.Element, resetKeySelectionByDraggingFinger(); mIsDetectingGesture = false; final Key currentKey; - if (mKeyboardLayoutHasBeenChanged) { + if (mKeyboardLayoutHasBeenChanged && mKeyboard.mId.isAlphabetKeyboard()) { // this is called when keyboard was changed shortly before releasing the key // e.g. when the input field is cleared and shift is set to auto right before pressing the key, // then we want to get the current key, and not the key from the old keyboard (bug report in #994) + // the check for alphabet keyboard is to prevent this workaround from breaking LongPressSymbolsForNumpad (#1268) currentKey = mKeyDetector.detectHitKey(x, y); setReleasedKeyGraphics(mCurrentKey, true); // need to call this, otherwise preview popup will stay open } else {