mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Modal: disable view flattening explicitly for the children of Modal, the content wrappers
Summary: I noticed that in ModalHostShadowNode.java (not used in Fabric), there's an assumption that the Modal will have exactly one child on the native side; this child is explicitly specified in Modal.js. However, in Fabric, these views are flattened and so the Modal will actually have N children - whatever children the product code passes into the Modal. In *theory* this should be fine, but might be causing issues. Not sure. This is an experiment and shouldn't be landed until we verify that (1) this actually matters, (2) that it fixes an issue with Modal on iOS or Android. Changelog: [Internal] Change to make Fabric consistent with non-Fabric Modal Reviewed By: mdvacca Differential Revision: D21191822 fbshipit-source-id: 9d65f346387fd056649d4063d70220f637ba8828
This commit is contained in:
committed by
Facebook GitHub Bot
parent
17adf549e2
commit
bda8aaeec2
@@ -237,7 +237,7 @@ class Modal extends React.Component<Props> {
|
||||
supportedOrientations={this.props.supportedOrientations}
|
||||
onOrientationChange={this.props.onOrientationChange}>
|
||||
<ScrollView.Context.Provider value={null}>
|
||||
<View style={[styles.container, containerStyles]}>
|
||||
<View style={[styles.container, containerStyles]} collapsable={false}>
|
||||
{innerChildren}
|
||||
</View>
|
||||
</ScrollView.Context.Provider>
|
||||
|
||||
@@ -23,6 +23,7 @@ exports[`<Modal /> should render as <RCTModalHostView> when not mocked 1`] = `
|
||||
}
|
||||
>
|
||||
<View
|
||||
collapsable={false}
|
||||
style={
|
||||
Array [
|
||||
Object {
|
||||
|
||||
Reference in New Issue
Block a user