Skip to content

Wrong 'margin' behavior on iOS RN 0.59 #24685

@serjiogunit

Description

@serjiogunit

🐛 Bug Report

Empty screen if some of component contains 'margin' value. Reproduces on simulator and real iPhone.
Screen Shot 2019-05-02 at 12 36 56

To Reproduce

Add 'margin' to component

Expected Behavior

Correct layout

Code Example

import React, {Component} from 'react';
import {AppRegistry, Text, View} from 'react-native';

class TestApp extends Component {
  render() {
    return (
      <View style={{ flex: 1, justifyContent: "center", alignItems: "center" }}>
        <Text style={{marginTop: 50}}>Hello, world!</Text>
      </View>
    );
  }
}

AppRegistry.registerComponent('TestApp', () => TestApp);

Environment

React Native Environment Info:
System:
OS: macOS 10.14.4
CPU: (4) x64 Intel(R) Core(TM) i5-4250U CPU @ 1.30GHz
Memory: 33.70 MB / 8.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 9.8.0 - ~/.nvm/versions/node/v10.2.1/bin/node
Yarn: 1.15.2 - /usr/local/bin/yarn
npm: 6.1.0 - ~/.nvm/versions/node/v10.2.1/bin/npm
Watchman: 4.4.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 12.2, macOS 10.14, tvOS 12.2, watchOS 5.2
Android SDK:
API Levels: 23, 25, 26, 27, 28
Build Tools: 23.0.1, 23.0.3, 25.0.0, 25.0.1, 25.0.2, 25.0.3, 26.0.0, 26.0.1, 26.0.3, 27.0.0, 27.0.3, 28.0.1, 28.0.3
System Images: android-28 | Google APIs Intel x86 Atom
IDEs:
Android Studio: 3.1 AI-173.4819257
Xcode: 10.2/10E125 - /usr/bin/xcodebuild
npmPackages:
react: ^16.8.3 => 16.8.6
react-native: ^0.59.6 => 0.59.6
npmGlobalPackages:
react-native-cookies: 3.3.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugPlatform: iOSiOS applications.StaleThere has been a lack of activity on this issue and it may be closed soon.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions