From 78a9125de87006c0da40edcd5d6029d360247ded Mon Sep 17 00:00:00 2001 From: Jack Wink Date: Fri, 19 Feb 2016 05:08:11 -0800 Subject: [PATCH] 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](https://github.com/facebook/react-native/commit/6941c4e027abb582d7cef0e7c3b9b7ebf51bc070). 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 --- Libraries/Components/ScrollResponder.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Libraries/Components/ScrollResponder.js b/Libraries/Components/ScrollResponder.js index 52c6c946b..c37de7ba5 100644 --- a/Libraries/Components/ScrollResponder.js +++ b/Libraries/Components/ScrollResponder.js @@ -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;