Skip to content

Commit

Permalink
Allow to skip scroll to child when focused
Browse files Browse the repository at this point in the history
  • Loading branch information
Strate committed Feb 20, 2021
1 parent 24eb7e5 commit 386733e
Show file tree
Hide file tree
Showing 13 changed files with 12 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ public class ReactScrollView extends ScrollView
private ReactViewBackgroundManager mReactBackgroundManager;
private @Nullable StateWrapper mStateWrapper;

protected boolean mShouldScrollToFocusedView = true;

public ReactScrollView(ReactContext context) {
this(context, null);
}
Expand Down Expand Up @@ -233,7 +235,7 @@ protected void onAttachedToWindow() {
*/
@Override
public void requestChildFocus(View child, View focused) {
if (focused != null) {
if (mShouldScrollToFocusedView && focused != null) {
scrollToChild(focused);
}
super.requestChildFocus(child, focused);
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
9ad231f1328c2e15cdb214701e3d67d7
a62d3aee1c9cceb11111e47fe86f6895
Original file line number Diff line number Diff line change
@@ -1 +1 @@
925dae6c0b95a76952b9ca67c9ecc0516d34845b
37b7ac95b0dad096a1f7c86e7c91ec9a19689801
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
23c74129204f5dce0775481f6c5c1846
7e018e1618e3ed91f7190a87fbf6f8fd
Original file line number Diff line number Diff line change
@@ -1 +1 @@
480ca5e1951bc5e1b402035e049d2f5989ee855b
120cf9185b4000a20ee888bb5143c7cd84252e5c
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4ab2f5077e71d37d103ec9a54c0125e3
2f0449d83b7a7b4fac4b1e4002168d9e
Original file line number Diff line number Diff line change
@@ -1 +1 @@
dc80e3daef98d8a93d0b27f112064dca2befad0b
f1488cee7e2aaea7296cd85ed28cef6ffd6a71be
2 changes: 1 addition & 1 deletion android/com/facebook/react/react-native/maven-metadata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
<versions>
<version>0.63.3</version>
</versions>
<lastUpdated>20210118115124</lastUpdated>
<lastUpdated>20210220082632</lastUpdated>
</versioning>
</metadata>
Original file line number Diff line number Diff line change
@@ -1 +1 @@
9e8368db4b25b70b3357d7651c2a9581
f6aef19bede087035fa4ee7003ec011c
Original file line number Diff line number Diff line change
@@ -1 +1 @@
c642c754fb73ebb284c5b44dbc1d4af6aa871921
9142920477d91d3be761d8f7152fd68f098bb017

0 comments on commit 386733e

Please sign in to comment.