diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.java index 56a10692cf15a3..23ab6f6a174d6d 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.java @@ -347,24 +347,18 @@ public void clearFocus() { @Override public boolean requestFocus(int direction, Rect previouslyFocusedRect) { - // This is a no-op so that when the OS calls requestFocus(), nothing will happen. ReactEditText - // is a controlled component, which means its focus is controlled by JS, with two exceptions: - // autofocus when it's attached to the window, and responding to accessibility events. In both - // of these cases, we call requestFocusInternal() directly. - return isFocused(); - } - - private boolean requestFocusInternal() { setFocusableInTouchMode(true); - // We must explicitly call this method on the super class; if we call requestFocus() without - // any arguments, it will call into the overridden requestFocus(int, Rect) above, which no-ops. - boolean focused = super.requestFocus(View.FOCUS_DOWN, null); + boolean focused = super.requestFocus(direction, previouslyFocusedRect); if (getShowSoftInputOnFocus()) { showSoftKeyboard(); } return focused; } + public boolean requestFocusInternal() { + return requestFocus(View.FOCUS_DOWN, null); + } + @Override public void addTextChangedListener(TextWatcher watcher) { if (mListeners == null) {