-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
Font issue on Android 4.x WebView #17385
Comments
I have the same issue :( |
Closes facebook#17385 The loadUrl() method ignores the default encoding on Android KitKat.
same issue |
@adrianomelo thanks but how can i upgrade react-native that refer to specific commit or tag when it is not release on NPM? |
@adrianomelo same question with @derakhshanfar. Should we create a PR to react-native repo? BTW, I will clone your repo to check again. |
@derakhshanfar, I can see two options if you need the fix for this problem asap. The first choice is using an older React Native version while the fix is not published. I guess that 0.49 is working fine. The second option is using a fork of React Native with my commit. You can use my branch if you don't want to fork RN. In this case, you can follow this tutorial on how to use RN built from the source replacing:
I don't recommend the second approach unless you are an experienced developer. This process usually takes a lot of time. Maintaining a fork is not fun. :) @huynhtansi, I already submitted a pull request with a fix for it. However, if you can test, it would be awesome. You can comment on the PR and it might speed up the process of merging it to upstream. |
Same here. |
This is really bad. I've almost finished my app before submission to the Google Play and stumbed upon this issue. Is there a workaround for this? |
Guys! Here's the solution that worked for me. On |
Thanks for posting this! It looks like you may not be using the latest version of React Native, v0.53.0, released on January 2018. Can you make sure this issue can still be reproduced in the latest version? I am going to close this, but please feel free to open a new issue if you are able to confirm that this is still a problem in v0.53.0 or newer. |
Hi @GrigoryPtashko , how to resolve in case I load a string html in source property? btw, it's still a problem in v0.53.0 and newer. Update: Got it, it should be 'source={{html, 'baseUrl': 'about:blank'}}' |
@huynhtansi see my comment above. |
Is this a bug report?
Yes. It appears when this commit is merged. On RN 0.50.0 above, Android 4.x WebView cannot display text/html format.
Have you read the Contributing Guidelines?
Yes
Environment
Environment:
OS: macOS High Sierra 10.13.2
Node: 8.9.1
Yarn: Not Found
npm: 5.5.1
Watchman: Not Found
Xcode: Xcode 9.2 Build version 9C40b
Android Studio: 3.0 AI-171.4443003
Packages: (wanted => installed)
react: 16.0.0 => 16.0.0
react-native: 0.50.0 => 0.50.0
Target Platform: Android 4.1.2 (API 16)
Steps to Reproduce
Render this component:
`export default class TestWebView extends Component<{}> {
}`
Expected Behavior
Actual Behavior
Reproducible Demo
(Paste the link to an example project and exact instructions to reproduce the issue.)
The text was updated successfully, but these errors were encountered: