-
-
Notifications
You must be signed in to change notification settings - Fork 591
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
Nested hyperlinks with neighbouring image are styled wrong #344
Comments
@sebk I implemented a test that could reproduce the issue. Will investigate on the cause and provide a fix before 4.2.2 release. |
@sebk Unfortunately a fix is non-trivial. The incriminated code is situated here: src/HTML.js#L370. Basically, what happens is that text styles which should be inherited to children are force-written into children's We might consider to make the inheritance behavior opt-in for the 5.0 release, with a prop such as |
@jsamr what can I do now to change the color of a link? |
This issue has been fixed in the Foundry release. Try it out now! See #430 for instructions. |
Is this a bug report or a feature request?
Bug report
Have you read the guidelines regarding bug report?
Yes
Have you read the documentation in its entirety?
Yes
Have you made sure that your issue hasn't already been reported/solved?
Yes
Is the bug specific to iOS or Android? Or can it be reproduced on both platforms?
Both platforms
Is the bug reproductible in a production environment (not a debug one)?
Yes
Have you been able to reproduce the bug in the provided example?
Yes
Environment
Environment:
React: 16.9.0
React native: 0.61.4
react-native-render-html: 4.2.0
Target Platform:
Android (8.0)
iOS (13.3)
Steps to Reproduce
<p>
-Tag. One of the has an image as a neighbour.Expected Behavior
Both links are inside a
<p>
-Tag. One of the has an image as a neighbour. The expected behaviour is that all text not in a link is renderer red and both links are rendered green.Actual Behavior
The link that has an image as a neighbour is renderer in the color of the parent paragraph (red). The link without an image as a neighbour is rendered green.
Reproducible Demo
https://snack.expo.io/B1PshHbVL
Check on iOS for example (not web).
The text was updated successfully, but these errors were encountered: