-
Notifications
You must be signed in to change notification settings - Fork 24.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix ReactHorizontalScrollView contentOffset
Summary: Brings the same fix https://www.internalfb.com/diff/D34015853 (be260b9) for ReactScrollView to ReactHorizontalScrollView When setting ScrollView's contentOffset, if the ScrollView hasn't been laid out yet when ReactHorizontalScrollViewManager.setContentOffset is called, then scroll position is never set properly. This is because the actual scroll offset (0, 0) was being passed into setPendingContentOffsets, instead of the desired scroll offset. Thus, when ReactHorizontalScrollView.onLayout gets called, ReactHorizontalScrollView.scrollTo gets called with (0, 0). Changelog: [Android][Fixed] - Fix ReactHorizontalScrollView contentOffset Reviewed By: bvanderhoof Differential Revision: D34246489 fbshipit-source-id: d923f7c9f136f7275d64bd658ffd5c2cc049d392
- Loading branch information
1 parent
90b98ef
commit 9f6f971
Showing
2 changed files
with
17 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters