mirror of
https://github.com/status-im/react-native.git
synced 2025-02-26 16:10:58 +00:00
Update ScrollResponder.js
to use new scrollTo
API
Summary:`scrollResponderInputMeasureAndScrollToKeyboard` is the only non-deprecated method in `ScrollResponder.js` that doesn't use the [new `scrollTo` API](6941c4e027
). The other method that uses the deprecated API (`scrollResponderScrollWithoutAnimationTo`) is also deprecated, so it has been left unaltered.
Closes https://github.com/facebook/react-native/pull/5990
Differential Revision: D2953916
Pulled By: nicklockwood
fb-gh-sync-id: d692c598e6b85d1050e58b87146d01b031653a49
shipit-source-id: d692c598e6b85d1050e58b87146d01b031653a49
This commit is contained in:
parent
19a1c4c229
commit
78a9125de8
@ -461,7 +461,7 @@ var ScrollResponderMixin = {
|
||||
if (this.preventNegativeScrollOffset) {
|
||||
scrollOffsetY = Math.max(0, scrollOffsetY);
|
||||
}
|
||||
this.scrollResponderScrollTo(0, scrollOffsetY);
|
||||
this.scrollResponderScrollTo({x: 0, y: scrollOffsetY, animated: true});
|
||||
|
||||
this.additionalOffset = 0;
|
||||
this.preventNegativeScrollOffset = false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user