Skip to content

Commit 69349eb

Browse files
committed
Revert "remove unused fn"
This reverts commit da6115c.
1 parent da6115c commit 69349eb

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

  • packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,17 @@ public void clearFocusAndMaybeRefocus() {
358358
clearFocusAndMaybeRefocus();
359359
}
360360

361+
private boolean requestFocusInternal() {
362+
// We must explicitly call this method on the super class; if we call requestFocus() without
363+
// any arguments, it will call into the overridden requestFocus(int, Rect) above, which no-ops.
364+
boolean focused = super.requestFocus(View.FOCUS_DOWN, null);
365+
if (getShowSoftInputOnFocus()) {
366+
showSoftKeyboard();
367+
}
368+
369+
return focused;
370+
}
371+
361372
// For cases like autoFocus, or ref.focus() where we request focus programatically and not through
362373
// interacting with the EditText directly (like clicking on it). We cannot use stock
363374
// requestFocus() because it will not pop up the soft keyboard, only clicking the input will do

0 commit comments

Comments
 (0)