-
Notifications
You must be signed in to change notification settings - Fork 24.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Text Not Show Content When style both set borderWidth and backgroundColor. #45938
Comments
@zdpdsy issue lists rn version |
@netmaxt3r sorry,i push code now. can you try it again? thank you! |
@zdpdsy thanks for update, i see that this is fabric related issue. issue is reproducible on current latest |
Thanks for the confirmation @netmaxt3r |
@zdpdsy This is fabric related issue. I'm trying to debug this issue.
This is responsible for drawing backgroundColor and borderWidth styles. I am looking to map same for Old Architecture. @cortinico Can you help me pointing the code responsible for handling border and backgroundColor for Old Architecture? |
OK,Thanks,i find a temporary solution is change border style To Super element Like as ,like th snapShot: but this solution is temporary,can't Real problem solving。 |
@shubhamguptadream11 issue might not be on that function , since it is reproducible with dotted border style as well probably with layer zIndex for border layer and main layer. react-native/packages/react-native/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm Line 737 in 5ced5f8
|
I have found one more issue related to this when border width is not specified or computed to zero with dotted style we loose background color <Text style={{
backgroundColor: '#F00',
borderWidth: 0,
borderStyle: 'dotted'
}}>hello</Text> this is due to early return without checking bgcolor react-native/packages/react-native/React/Views/RCTBorderDrawing.m Lines 469 to 471 in ee25081
|
@netmaxt3r I found one more issue related to border in Text Component only. |
I did some comparison with old and new arch implementation, i see border styling is not working properly even on old arch <View style={{
backgroundColor: '#F00',
borderColor: "black",
borderWidth: 1,
borderStyle: "dashed",
minHeight: 30,
}}/>
<Text
style={{
backgroundColor: '#F00',
borderColor: "black",
borderWidth: 1,
borderStyle: "dashed",
minHeight: 30,
marginTop: 10,
}}
>hello</Text> text view render with I also see in the new arch
|
Any one can try this #45972 ? |
Description
Text Not Show Content When style both set borderWidth and backgroundColor.
if Text style is styles.tag, the '预售' Not Show,only show backgroundColor
else style is styles.tag, the '停止营业' Can show normally
like this
The Code:
style class:
Code link: https://github.com/zdpdsy/reproducer/blob/main/ReproducerApp/App.tsx
Steps to reproduce
1.cd ReproducerApp
2. npm run start
3. run Xcode
React Native Version
0.73.9
Affected Platforms
Runtime - iOS
Areas
Fabric - The New Renderer
Output of
npx react-native info
Stacktrace or Logs
Reproducer
https://github.com/zdpdsy/reproducer
The text was updated successfully, but these errors were encountered: