Skip to content

Commit

Permalink
Merge pull request #2282 from syphyr/cursor_fix
Browse files Browse the repository at this point in the history
Do not hide keyboard when SearchEditText is inactive view
  • Loading branch information
marunjar authored May 7, 2024
2 parents 84882b2 + 61be302 commit 9f3a9c3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/src/main/java/fr/neamar/kiss/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -621,7 +621,9 @@ public boolean dispatchTouchEvent(MotionEvent ev) {
if (isKeyboardOpen) {
edit.clearFocus();
InputMethodManager imm = (InputMethodManager) this.getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(edit.getWindowToken(), 0);
if (imm.isActive(edit)) {
imm.hideSoftInputFromWindow(edit.getWindowToken(), 0);
}
}
edit.setCursorVisible(!isKeyboardOpen);
}
Expand Down

0 comments on commit 9f3a9c3

Please sign in to comment.