React-native: update react native from 0.52.0 to 0.53.0 , shadow become textshadow

Created on 6 Feb 2018  路  15Comments  路  Source: facebook/react-native

Is this a bug report?

yes

Have you read the Contributing Guidelines?

yes

Environment

Environment:
OS: macOS Sierra 10.13.2
Node: 8.9.0
npm: 5.5.1
Watchman: 4.9.0
Xcode: Xcode 9.2

Packages:
"react-native": "0.53.0",
"react": "16.2.0",
Target Platform: iOS (10.3)

Steps to Reproduce

1.update react native from 0.52 to 0.53

Expected Behavior

image

Actual Behavior

image

I did not change my code ,just update react native, and shadow changed
image
image

Reproducible Demo

https://github.com/jeodiong/qafClient

Regression Author Provided Repro iOS Stale

Most helpful comment

Everything is fine when you set backgroundColor for every view with shadow

All 15 comments

all my box-shadow disapear, and become textshadow
image

I try again ,0.52.0 is fine

+1 !!!
How to fix it?

@jeodiong Hello! Did you find a solution?

@kesha-antonov No, using 0.52.0, dont use 0.53

Everything is fine when you set backgroundColor for every view with shadow

This definitely seems to be an issue to shadows on transparent views, and if a color is not applied, it seems to be applied to any nested subviews of that view.

Here, unless a background color is set on the parent view, a shadow is applied to an inner absolutely positioned view.

https://github.com/joshyhargreaves/react-native-shadow-regression-demo-0.53
Snack which demonstrates the expected behavior: (https://snack.expo.io/SJrNN3BuG)

It looks like @shergin did some work on shadows in 0.52 https://github.com/facebook/react-native/commits/master/React/Views/RCTShadowView.m. Any ideas on this one @shergin ?

0.52

0.53

I'm having the same exact issue

Having same issue on 0.54, using @futuun's fix for now. (However it doesn't work to set the backgroundColor to transparent).

+1, can confirm that using backgroundColor on the views solves the issue

Thanks for posting this! It looks like your issue may be missing some necessary information. Can you run react-native info and edit your issue to include these results under the Environment section?

Thank you for your contributions.

@react-native-bot

Environment:
OS: macOS High Sierra 10.13.4
Node: 8.11.3
Yarn: 1.7.0
npm: 5.6.0
Watchman: 4.7.0
Xcode: Xcode 9.4.1 Build version 9F2000
Android Studio: 3.1 AI-173.4670197

Packages: (wanted => installed)
react: 16.0.0 => 16.0.0
react-native: 0.53.0 => 0.53.0

Not old version. 0.57.0 is also affected.

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as "For Discussion" or "Good first issue" and I will leave it open. Thank you for your contributions.

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.

Was this page helpful?
0 / 5 - 0 ratings