From 40ea2b50d1687682686ec4a098b163beee509fb5 Mon Sep 17 00:00:00 2001 From: maxli Date: Tue, 27 Feb 2024 18:20:56 +0800 Subject: [PATCH] fix(android): should hide soft input even input not focus --- .../com/tencent/mtt/hippy/views/textinput/HippyTextInput.java | 2 +- .../mtt/hippy/views/textinput/HippyTextInputController.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/renderer/native/android/src/main/java/com/tencent/mtt/hippy/views/textinput/HippyTextInput.java b/renderer/native/android/src/main/java/com/tencent/mtt/hippy/views/textinput/HippyTextInput.java index 9ea03d6d988..7ab860a52fb 100644 --- a/renderer/native/android/src/main/java/com/tencent/mtt/hippy/views/textinput/HippyTextInput.java +++ b/renderer/native/android/src/main/java/com/tencent/mtt/hippy/views/textinput/HippyTextInput.java @@ -266,7 +266,7 @@ public InputMethodManager getInputMethodManager() { public void hideInputMethod() { InputMethodManager imm = this.getInputMethodManager(); - if (imm != null && imm.isActive(this)) { + if (imm != null && imm.isActive()) { try { imm.hideSoftInputFromWindow(this.getWindowToken(), 0); } catch (Exception e) { diff --git a/renderer/native/android/src/main/java/com/tencent/mtt/hippy/views/textinput/HippyTextInputController.java b/renderer/native/android/src/main/java/com/tencent/mtt/hippy/views/textinput/HippyTextInputController.java index d76e50eebc0..0a5cf1da622 100644 --- a/renderer/native/android/src/main/java/com/tencent/mtt/hippy/views/textinput/HippyTextInputController.java +++ b/renderer/native/android/src/main/java/com/tencent/mtt/hippy/views/textinput/HippyTextInputController.java @@ -77,7 +77,7 @@ public class HippyTextInputController extends HippyViewController