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:
Jack Wink 2016-02-19 05:08:11 -08:00 committed by facebook-github-bot-7
parent 19a1c4c229
commit 78a9125de8

View File

@ -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;