Skip to content

Commit

Permalink
Back out "prevent scroll event in nested scroll when scrollEnabled={f…
Browse files Browse the repository at this point in the history
…alse}"

Summary:
Original commit changeset: 9305bc56ba6b

Original Phabricator Diff: D52642168

bypass-github-export-checks

changelog: [Android][Fix] Backout fix that prevented scroll event in nested scroll when scrollEnabled = false, due to causing bugs when interacting with keyboard events

Reviewed By: bvanderhoof, arushikesarwani94

Differential Revision: D52736596

fbshipit-source-id: fa8c5c598e049cc58410892813825852c431eee4
  • Loading branch information
mdvacca authored and facebook-github-bot committed Jan 12, 2024
1 parent 1a6f97f commit 07a676a
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -394,16 +394,6 @@ protected void onLayout(boolean changed, int l, int t, int r, int b) {
*/
@Override
public void requestChildFocus(View child, View focused) {
/**
* This issue arises in a ScrollView containing a FlatList. The method now checks
* `mScrollEnabled` before handling focus requests to prevent unintended scroll behavior,
* ensuring proper functioning of nested scrolling components. when scrollEnabled={false}
*/
if (!mScrollEnabled) {

return;
}

if (focused != null && !mPagingEnabled) {
scrollToChild(focused);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -343,16 +343,6 @@ protected void onDetachedFromWindow() {
*/
@Override
public void requestChildFocus(View child, View focused) {
/**
* This issue arises in a ScrollView containing a FlatList. The method now checks
* `mScrollEnabled` before handling focus requests to prevent unintended scroll behavior,
* ensuring proper functioning of nested scrolling components. when scrollEnabled={false}
*/
if (!mScrollEnabled) {

return;
}

if (focused != null) {
scrollToChild(focused);
}
Expand Down

1 comment on commit 07a676a

@Icehunter
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, didn't see that coming. Is there a potential work around for this? The only other way I got it working was a FlatList inside a FlatList, but it's less performance.

Please sign in to comment.