Skip to content

Commit 3735d72

Browse files
committed
fixing a glitch with popup keyboard disappearing instantly
1 parent 3875b35 commit 3735d72

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

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

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1050,10 +1050,12 @@ class MyKeyboardView @JvmOverloads constructor(context: Context, attrs: Attribut
10501050
mMiniKeyboard!!.invalidateAllKeys()
10511051
}
10521052

1053-
if (coords[0] - me.x > mPopupMaxMoveDistance || // left
1054-
me.x - (coords[0] + mMiniKeyboard!!.width) > mPopupMaxMoveDistance // right
1055-
) {
1056-
dismissPopupKeyboard()
1053+
if (coords[0] > 0 || coords[1] > 0) {
1054+
if (coords[0] - me.x > mPopupMaxMoveDistance || // left
1055+
me.x - (coords[0] + mMiniKeyboard!!.measuredWidth) > mPopupMaxMoveDistance // right
1056+
) {
1057+
dismissPopupKeyboard()
1058+
}
10571059
}
10581060
}
10591061
}

0 commit comments

Comments
 (0)