react-native-render-html icon indicating copy to clipboard operation
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

Open Pujan92 opened this issue 2 years ago • 2 comments

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 of tagsStyles
  • for some <strong> elements it is considering body tag style or baseStyle in case of TRenderEngineProvider

It is happening only for Android.

Screenshot 2023-03-20 at 11 01 09 PM

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 avatar Mar 20 '23 17:03 Pujan92

@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.

jsamr avatar Mar 20 '23 17:03 jsamr

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.

Pujan92 avatar Mar 21 '23 06:03 Pujan92