Skip to content

Commit 09bc110

Browse files
committed
Fixed a bug when clicking on layout change and space at the same time
1 parent 7ac8bc9 commit 09bc110

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/src/main/kotlin/com/simplemobiletools/keyboard/views/MyKeyboardView.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1154,8 +1154,8 @@ class MyKeyboardView @JvmOverloads constructor(context: Context, attrs: Attribut
11541154

11551155
// fix a glitch with long pressing backspace, then clicking some letter
11561156
if (mRepeatKeyIndex != NOT_A_KEY) {
1157-
val key = mKeys[mRepeatKeyIndex]
1158-
if (key.code == KEYCODE_DELETE) {
1157+
val key = mKeys.getOrNull(mRepeatKeyIndex)
1158+
if (key?.code == KEYCODE_DELETE) {
11591159
mHandler?.removeMessages(MSG_REPEAT)
11601160
mRepeatKeyIndex = NOT_A_KEY
11611161
}

0 commit comments

Comments
 (0)