react-native-render-html
react-native-render-html copied to clipboard
Different style gets applied to same tag(strong, em, del) in Android for single html render which considers either tag(strong), tag(body) or baseStyle properties
Decision Table
- [X] My issue does not look like “The HTML attribute 'xxx' is ignored” (unless we claim support for it)
- [X] My issue does not look like “The HTML element
<yyy>is not rendered”
Good Faith Declaration
- [X] I have read the HELP document here: https://git.io/JBi6R
- [X] I have read the CONTRIBUTING document here: https://git.io/JJ0Pg
- [X] I have confirmed that this bug has not been reported yet
Description
For the same tag(strong) in html render
- for some
<strong>elements it is applying the styles oftagsStyles - for some
<strong>elements it is consideringbodytag style orbaseStylein case ofTRenderEngineProvider
It is happening only for Android.
React Native Information
confer snack
RNRH Version
6.3.1
Tested Platforms
- [X] Android
- [X] iOS
- [X] Web
- [X] MacOS
- [X] Windows
Reproduction Platforms
- [X] Android
- [ ] iOS
- [ ] Web
- [ ] MacOS
- [ ] Windows
Minimal, Reproducible Example
https://snack.expo.dev/@pujan92/render-html-snippet?platform=android
Additional Notes
No response
@Pujan92
It is happening only for Android.
That's clearly a hint that the bug is with React Native; strongly reminds me of this one: https://github.com/facebook/react-native/issues/31826
You may want to try the Fabric rendering engine, which might have a fix for this.
I thought as we are passing the different sets of styles to the RenderHtml which might be responsible for the issue cause, but Thanks @jsamr for informing about the issue persists with React Native.