Do you want to request a feature or report a bug?
Bug
What is the current behavior?
Blank page in Safari
If the current behavior is a bug, please provide the steps to reproduce and
if a minimal demo of the problem via Glitch or similar (template:
https://glitch.com/edit/#!/react-native-web-playground).

const styles = StyleSheet.create({
cellStyle: {
backgroundColor: 'white',
width: 50,
borderWidth: 1,
borderStyle: 'solid'
}
});
class App extends Component {
render() {
return (
<View>
<ScrollView horizontal={true}>
<View style={styles.cellStyle}>
<Text>hi</Text>
</View>
<View style={styles.cellStyle}>
<Text>hi</Text>
</View>
</ScrollView>
</View>
);
}
}
Note that adding the following attribute to the outer View element fixes it:
style={{display: 'block'}}
But it doesn't seem this should be necessary, as we're using Flexbox.
What is the expected behavior?
Safari renders scroll view content like in Chrome.
Environment (include versions). Did this work in previous versions?
Hi @lyahdav,
I wonder if the Safari issue you are seeing is related to this flexbug: https://github.com/philipwalton/flexbugs/issues/132
By adding a flexBasis: 'auto' to your scrollview鈥撀爓e'll override the default 0% value and Safari should be happy.
Your example remixed: https://harvest-hubcap.glitch.me/
Source code: https://glitch.com/edit/#!/harvest-hubcap?path=src/App/index.js:22:63
The core of the problem is this:
In Chrome, flex:1 sets flexBasis:0%.
In Safari, flex:1 sets flexBasis:0px.
Both browsers handle these values in opposite ways. In Safari, 0% causes the content to collapse down to 0px height. In Chrome, it is 0px that does this.
I think #648 fixes the problem if you want to give it a try
Master should now have a fix for flex:1 use in all supported browsers鈥xcept IE. We don't currently support IE10/11 in Twitter Lite, so it's not my priority to fix that browser's flex issues right at this moment
In Safari on iOS <= 10 this bug still persists i.e. the ScrollView has a height of zero.
Same here, still seeing the problem.
Setting flex: 1 on the root container fixed this for me
Most helpful comment
Hi @lyahdav,
I wonder if the Safari issue you are seeing is related to this flexbug: https://github.com/philipwalton/flexbugs/issues/132
By adding a
flexBasis: 'auto'to your scrollview鈥撀爓e'll override the default 0% value and Safari should be happy.Your example remixed: https://harvest-hubcap.glitch.me/
Source code: https://glitch.com/edit/#!/harvest-hubcap?path=src/App/index.js:22:63