[ReactNative][Navigator] Fix disabled scene height change

Summary:
Disabling the scene this way would make the scene height go to zero and mess up the scroll position. By setting the bottom to the same distance, the view does not get resized and the scroll position is preserved through a scene disable cycle.
This commit is contained in:
Eric Vicenti 2015-07-30 12:47:03 -07:00
parent f2b3057a7c
commit 41dd6fe6ea
1 changed files with 3 additions and 0 deletions

View File

@ -59,6 +59,7 @@ var SCENE_DISABLED_NATIVE_PROPS = {
pointerEvents: 'none',
style: {
top: SCREEN_HEIGHT,
bottom: -SCREEN_HEIGHT,
opacity: 0,
},
};
@ -109,6 +110,7 @@ var styles = StyleSheet.create({
},
disabledScene: {
top: SCREEN_HEIGHT,
bottom: -SCREEN_HEIGHT,
},
transitioner: {
flex: 1,
@ -535,6 +537,7 @@ var Navigator = React.createClass({
pointerEvents: 'auto',
style: {
top: sceneStyle.top,
bottom: sceneStyle.bottom,
},
};
if (sceneIndex !== this.state.transitionFromIndex &&