From 3f213e37d3872156b276b53f1336ba80b5e8a07b Mon Sep 17 00:00:00 2001 From: Olivier Notteghem Date: Fri, 25 Sep 2015 12:57:49 -0700 Subject: [PATCH] Fix scrollTo() method to pass integer as opposed to float MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed By: @​nspaun Differential Revision: D2480775 --- Libraries/Components/ScrollResponder.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Libraries/Components/ScrollResponder.js b/Libraries/Components/ScrollResponder.js index 1b5ea15f1..3dc162dfa 100644 --- a/Libraries/Components/ScrollResponder.js +++ b/Libraries/Components/ScrollResponder.js @@ -355,13 +355,13 @@ var ScrollResponderMixin = { RCTUIManager.dispatchViewManagerCommand( React.findNodeHandle(this), RCTUIManager.RCTScrollView.Commands.scrollTo, - [offsetX, offsetY], + [Math.round(offsetX), Math.round(offsetY)], ); } else { RCTUIManager.scrollTo( React.findNodeHandle(this), offsetX, - offsetY + offsetY, ); } },