Skip to content

flexDirection seems to be set to column-reverse in 0.60.* #28780

Closed
@shercoder

Description

@shercoder

Description

After upgrading to RN 0.60.* from 0.59.10, we noticed everything was rendering in a reverse order. I have upgraded to 0.61.5 hoping it would fix the issue but it did not. This issue can only be seen on iOS running on a device. Android device/emulator and iOS simulator render everything in order.

According to RN documentation, flexDirection: column is by default but it doesn't seem to be the case. It seems like it is being set to column-reverse. I applied flexDirection: column manually to our main component and then everything rendered in order.

I started putting breakpoints in some of RN's files like the RCTView.m and RCTUiManager.m, it looks like RCTShadowView in uiBlockWithLayoutUpdateForRootView method of RCTUiManager has direction set to LTR but it's property layoutMetrics has direction set to RTL and this seems to be the issue. I'm not 100% since I'm not familiar with the codebase but having a mix of layout directions on a same object doesn't sound right.

We tested this on two different iOS Devices:

  1. iPhone 8 with OS 13.2
  2. iPhone 7 Plus with 11.2.1

React Native version:

System:
OS: macOS Mojave 10.14.4
CPU: (12) x64 Intel(R) Core(TM) i9-8950HK CPU @ 2.90GHz
Memory: 809.16 MB / 16.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 10.14.1 - ~/.nvm/versions/node/v10.14.1/bin/node
npm: 6.9.0 - ~/.nvm/versions/node/v10.14.1/bin/npm
Watchman: 4.9.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: 27, 28
Build Tools: 27.0.1, 28.0.3
System Images: android-22 | Google APIs Intel x86 Atom, android-26 | Google APIs Intel x86 Atom, android-28 | Intel x86 Atom, android-28 | Intel x86 Atom_64, android-28 | Google APIs Intel x86 Atom, android-28 | Google APIs Intel x86 Atom_64, android-28 | Google Play Intel x86 Atom, android-29 | Google APIs Intel x86 Atom
IDEs:
Xcode: 10.2.1/10E1001 - /usr/bin/xcodebuild
npmPackages:
react: 16.9.0 => 16.9.0
react-native: 0.61.5 => 0.61.5
npmGlobalPackages:
solidarity-react-native: 2.0.2

Steps To Reproduce

Provide a detailed list of steps that reproduce the issue.

  1. Upgrade your existing app to 0.60.* or even 0.61.* (I have tried both hoping it would fix in 0.61.*)
  2. Run the app on an iOS device

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions