Some Unicode Languages Cut Off on Android when Wrapped in View
Description
With a unicode language (In this particular case, Tibetan) inside of a view inside of a scroll view, the text is cut off. This appears to be different than the previous issues solved by setUseLineSpacingFromFallback, or may be caused by it.
React Native version:
System: OS: macOS 11.4 CPU: (8) arm64 Apple M1 Memory: 160.77 MB / 8.00 GB Shell: 5.8 - /bin/zsh Binaries: Node: 16.2.0 - /opt/homebrew/bin/node Yarn: 1.22.10 - /opt/homebrew/bin/yarn npm: 7.13.0 - /opt/homebrew/bin/npm Watchman: Not Found Managers: CocoaPods: 1.10.1 - /opt/homebrew/bin/pod SDKs: iOS SDK: Platforms: iOS 14.5, DriverKit 20.4, macOS 11.3, tvOS 14.5, watchOS 7.4 Android SDK: API Levels: 27, 28, 29, 30 Build Tools: 29.0.2, 30.0.3, 31.0.0 System Images: android-30 | Google APIs ARM 64 v8a Android NDK: Not Found IDEs: Android Studio: Bumblebee 2021.1.1 Canary 1 Bumblebee 2021.1.1 Canary 1 Xcode: 12.5/12E262 - /usr/bin/xcodebuild Languages: Java: 11.0.10 - /usr/bin/javac npmPackages: @react-native-community/cli: Not Found react: 17.0.1 => 17.0.1 react-native: 0.64.1 => 0.64.1 react-native-macos: Not Found npmGlobalPackages: react-native: Not Found
Steps To Reproduce
Provide a detailed list of steps that reproduce the issue.
- Create a Scroll View
- Put a View inside that scroll view
- Put unicode text inside that view inside the scroll view
Expected Results
The scroll view should allow the entire contents of the View to be seen. Text is instead, prematurely cut off. Does not occur with text written in latin characters.
Snack, code example, screenshot, or link to a repository:
https://snack.expo.io/5rzuDgL_-
I was able to fix this using:
<View style={[styles.content, contentHeight > 0 && { height: contentHeight }]} onLayout={(event) => setContentHeight(event.nativeEvent.layout.height)} >
Which hints to me that something else unusual is going on - the view is not sizing to the height of the content but the layout knows the proper height.
This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.
This issue was closed because it has been stalled for 7 days with no activity.