Skip to content

Commit 0e6e51a

Browse files
committed
fix(android): fix keyboard not hiding on back button
1 parent f86acbf commit 0e6e51a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/textfield/platforms/android/java/com/nativescript/material/textfield/TextInputEditText.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public boolean dispatchKeyEventPreIme(KeyEvent event) {
5858
if (imm != null && imm.isActive() && event.getAction() == android.view.KeyEvent.ACTION_UP
5959
&& event.getKeyCode() == android.view.KeyEvent.KEYCODE_BACK) {
6060
// when hiding the keyboard with the back button also blur
61-
clearFocus();
61+
fullClearFocus();
6262
return true;
6363
}
6464
return super.dispatchKeyEventPreIme(event);

packages/textview/platforms/android/java/com/nativescript/material/textview/TextViewInputEditText.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public boolean dispatchKeyEventPreIme(KeyEvent event) {
5858
if (imm != null && imm.isActive() && event.getAction() == android.view.KeyEvent.ACTION_UP
5959
&& event.getKeyCode() == android.view.KeyEvent.KEYCODE_BACK) {
6060
// when hiding the keyboard with the back button also blur
61-
clearFocus();
61+
fullClearFocus();
6262
return true;
6363
}
6464
return super.dispatchKeyEventPreIme(event);

0 commit comments

Comments
 (0)