mirror of
https://github.com/SimpleMobileTools/Simple-Keyboard.git
synced 2025-02-01 10:36:43 +01:00
fixing a glitch with popup keyboard disappearing instantly
This commit is contained in:
parent
3875b35348
commit
3735d727f4
@ -1050,13 +1050,15 @@ class MyKeyboardView @JvmOverloads constructor(context: Context, attrs: Attribut
|
||||
mMiniKeyboard!!.invalidateAllKeys()
|
||||
}
|
||||
|
||||
if (coords[0] > 0 || coords[1] > 0) {
|
||||
if (coords[0] - me.x > mPopupMaxMoveDistance || // left
|
||||
me.x - (coords[0] + mMiniKeyboard!!.width) > mPopupMaxMoveDistance // right
|
||||
me.x - (coords[0] + mMiniKeyboard!!.measuredWidth) > mPopupMaxMoveDistance // right
|
||||
) {
|
||||
dismissPopupKeyboard()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
MotionEvent.ACTION_UP, MotionEvent.ACTION_CANCEL -> {
|
||||
mMiniKeyboard?.mKeys?.firstOrNull { it.focused }?.apply {
|
||||
mOnKeyboardActionListener!!.onKey(code)
|
||||
|
Loading…
x
Reference in New Issue
Block a user