Make the scrollResponderScrollNativeHandleToKeyboard works on Android

This commit is contained in:
Rui Chen
2015-07-23 17:57:42 -07:00
parent e01f90784f
commit accf6f12e4
3 changed files with 26 additions and 17 deletions

View File

@@ -286,19 +286,8 @@ var ScrollView = React.createClass({
},
scrollTo: function(destY?: number, destX?: number) {
if (Platform.OS === 'android') {
RCTUIManager.dispatchViewManagerCommand(
React.findNodeHandle(this),
RCTUIManager.RCTScrollView.Commands.scrollTo,
[destX || 0, destY || 0]
);
} else {
RCTUIManager.scrollTo(
React.findNodeHandle(this),
destX || 0,
destY || 0
);
}
// $FlowFixMe - Don't know how to pass Mixin correctly. Postpone for now
this.getScrollResponder().scrollResponderScrollTo(destX || 0, destY || 0);
},
scrollWithoutAnimationTo: function(destY?: number, destX?: number) {