fixing a glitch with popup keyboard disappearing instantly

This commit is contained in:
tibbi 2022-03-09 15:17:21 +01:00
parent 3875b35348
commit 3735d727f4
1 changed files with 6 additions and 4 deletions

View File

@ -1050,10 +1050,12 @@ class MyKeyboardView @JvmOverloads constructor(context: Context, attrs: Attribut
mMiniKeyboard!!.invalidateAllKeys() mMiniKeyboard!!.invalidateAllKeys()
} }
if (coords[0] - me.x > mPopupMaxMoveDistance || // left if (coords[0] > 0 || coords[1] > 0) {
me.x - (coords[0] + mMiniKeyboard!!.width) > mPopupMaxMoveDistance // right if (coords[0] - me.x > mPopupMaxMoveDistance || // left
) { me.x - (coords[0] + mMiniKeyboard!!.measuredWidth) > mPopupMaxMoveDistance // right
dismissPopupKeyboard() ) {
dismissPopupKeyboard()
}
} }
} }
} }