mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Reset internal state of RCTScrollViewComponentView in scrollViewDidEndDragging
Summary: changelog: [internal] `_isUserTriggeredScrolling` must be NO when user interaction stops. This was not the case when user scrolled -> lifted finger but the scroll did not decelerate into position. The case with deceleration is handled in method `scrollViewDidEndDecelerating`. Reviewed By: javache Differential Revision: D45147325 fbshipit-source-id: 1b55dc708c4c7d6cffa917a822eb2b569b22dbb2
This commit is contained in:
committed by
Facebook GitHub Bot
parent
81d8992ceb
commit
bd64699f0a
+7
@@ -492,7 +492,14 @@ static void RCTSendScrollEventForNativeAnimations_DEPRECATED(UIScrollView *scrol
|
||||
}
|
||||
|
||||
std::static_pointer_cast<ScrollViewEventEmitter const>(_eventEmitter)->onScrollEndDrag([self _scrollViewMetrics]);
|
||||
|
||||
[self _updateStateWithContentOffset];
|
||||
|
||||
if (!decelerate) {
|
||||
// ScrollView will not decelerate and `scrollViewDidEndDecelerating` will not be called.
|
||||
// `_isUserTriggeredScrolling` must be set to NO here.
|
||||
_isUserTriggeredScrolling = NO;
|
||||
}
|
||||
}
|
||||
|
||||
- (void)scrollViewWillBeginDecelerating:(UIScrollView *)scrollView
|
||||
|
||||
Reference in New Issue
Block a user