Skip to content

Commit

Permalink
Merge pull request #2285 from syphyr/fix_keyboard
Browse files Browse the repository at this point in the history
Do not hide keyboard when dispatching touch event
  • Loading branch information
marunjar authored May 13, 2024
2 parents e2f74dc + 48ea467 commit 97350b9
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions app/src/main/java/fr/neamar/kiss/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -618,13 +618,6 @@ public boolean dispatchTouchEvent(MotionEvent ev) {
Rect outR = new Rect();
edit.getGlobalVisibleRect(outR);
Boolean isKeyboardOpen = !outR.contains((int)ev.getRawX(), (int)ev.getRawY());
if (isKeyboardOpen) {
edit.clearFocus();
InputMethodManager imm = (InputMethodManager) this.getSystemService(Context.INPUT_METHOD_SERVICE);
if (imm.isActive(edit)) {
imm.hideSoftInputFromWindow(edit.getWindowToken(), 0);
}
}
edit.setCursorVisible(!isKeyboardOpen);
}
}
Expand Down

0 comments on commit 97350b9

Please sign in to comment.