react-native icon indicating copy to clipboard operation
react-native copied to clipboard

Android: Native view styling causes WebView to lose its height

Open overminder opened this issue 10 years ago • 1 comments

Context

  • Reproducible on react-native@{0.24.1,0.29.0,0.30.0,0.31.0-rc.1}
  • Android 4.4, 5.0, 5.1 and 6.0 (shouldn't matter)

Reproduction

A minimal example can be found here. Note the difference between the Android and the iOS version. What's interesting is that if you remove the backgroundColor style from the Decorated component, both versions work identically. Other kinds of native styling (shadow{Radius,Color,Offset,Opacity} etc) can also trigger this issue.

Analysis

Enabling WebView debugging and I found that in the Android version's WebView, the element's height was 0 when backgroundColor style was present.

overminder avatar Aug 04 '16 09:08 overminder

Might have been fixed in 1bb1385c7d199a473f76cdec357de2ab4d1d61b6, let me try it...

Yes, I can confirm that this issue has been fixed in the above commit.

overminder avatar Aug 07 '16 03:08 overminder