Skip to content

Commit f0b5614

Browse files
authored
EditText AutoFocus is not working (#302)
* EditText AutoFocus is not working * Change files * Change files * Change files * Change files * Cleaning up unneeded change files and renaming the package.json in android-patches to avoid being tracked * A nudge to restart the CI runs Co-authored-by: Anandraj Govindan <[email protected]>
1 parent 6271791 commit f0b5614

File tree

2 files changed

+16
-6
lines changed

2 files changed

+16
-6
lines changed
File renamed without changes.

android-patches/patches-droid-office-grouped/UIEditText/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.java

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
--- "e:\\github\\fb-react-native-forpatch-base\\ReactAndroid\\src\\main\\java\\com\\facebook\\react\\views\\textinput\\ReactEditText.java" 2020-01-30 13:55:48.432612400 -0800
2-
+++ "e:\\github\\ms-react-native-forpatch\\ReactAndroid\\src\\main\\java\\com\\facebook\\react\\views\\textinput\\ReactEditText.java" 2020-01-29 14:10:09.612921100 -0800
1+
--- "D:\\code\\work\\react-native\\ReactAndroid\\src\\main\\java\\com\\facebook\\react\\views\\textinput\\ReactEditText.java" 2020-04-13 10:06:53.422431000 -0700
2+
+++ "D:\\code\\work\\ms_react_native\\ReactAndroid\\src\\main\\java\\com\\facebook\\react\\views\\textinput\\ReactEditText.java" 2020-04-13 18:32:34.087121800 -0700
33
@@ -8,6 +8,7 @@
44
package com.facebook.react.views.textinput;
55

@@ -54,7 +54,7 @@
5454
public void addTextChangedListener(TextWatcher watcher) {
5555
if (mListeners == null) {
5656
mListeners = new ArrayList<>();
57-
@@ -272,6 +248,16 @@
57+
@@ -272,10 +248,26 @@
5858
@Override
5959
protected void onFocusChanged(
6060
boolean focused, int direction, Rect previouslyFocusedRect) {
@@ -71,7 +71,17 @@ protected void onFocusChanged(
7171
super.onFocusChanged(focused, direction, previouslyFocusedRect);
7272
if (focused && mSelectionWatcher != null) {
7373
mSelectionWatcher.onSelectionChanged(getSelectionStart(), getSelectionEnd());
74-
@@ -291,12 +277,9 @@
74+
}
75+
+
76+
+ if(focused)
77+
+ showSoftKeyboard();
78+
+ else
79+
+ hideSoftKeyboard();
80+
+
81+
}
82+
83+
public void setSelectionWatcher(SelectionWatcher selectionWatcher) {
84+
@@ -291,12 +283,9 @@
7585
}
7686

7787
public boolean getBlurOnSubmit() {
@@ -87,7 +97,7 @@ public boolean getBlurOnSubmit() {
8797
}
8898

8999
public void setDisableFullscreenUI(boolean disableFullscreenUI) {
90-
@@ -359,9 +342,13 @@
100+
@@ -359,9 +348,13 @@
91101

92102
// VisibleForTesting from {@link TextInputEventsTestCase}.
93103
public void requestFocusFromJS() {
@@ -103,7 +113,7 @@ public void requestFocusFromJS() {
103113
}
104114

105115
/* package */ void clearFocusFromJS() {
106-
@@ -460,11 +447,17 @@
116+
@@ -460,11 +453,17 @@
107117
return true;
108118
}
109119

0 commit comments

Comments
 (0)