MIGRATED: Android WebView don't apply CSS filter properly. (#20979)
See original GitHub issueMigrated from facebook/react-native#20979.
@kevinNejad says:
Review the documentation: facebook.github.io/react-native Search for existing issues: facebook/react-native/issues React Native Environment Info: System: OS: Linux 4.15 Ubuntu 18.04.1 LTS (Bionic Beaver) CPU: x64 Intel® Core™ i7-8550U CPU @ 1.80GHz Memory: 322.83 MB / 15.39 GB Shell: 4.4.19 - /bin/bash Binaries: Node: 8.11.4 - /usr/bin/node Yarn: 1.9.4 - /usr/bin/yarn npm: 5.6.0 - /usr/bin/npm Watchman: 4.7.0 - /usr/local/bin/watchman npmPackages: react: 16.4.1 => 16.4.1 react-native: 0.56.0 => 0.56.0 npmGlobalPackages: react-native-cli: 2.0.1 react-native-git-upgrade: 0.2.7
setFilter: function (cb, filter) {
let filterValue = 'invert(0%)';
if (filter === 'foo') {
filterValue = 'brightness(0.8) sepia(0.9)';
} else if (filter === 'bar') {
filterValue = 'invert(80%)';
}
Filters applies to iOS perfectly but on android only applies to images and the rest of the page gets blurry.
More info in original thread
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (2 by maintainers)
FYI, adding a default background (in my case,
#fff
) to the body, html tags fixes the issue referenced by @kevinNejad. This appears to be a non-issue and can be closed.@Titozzz @LambyPants It works a treat.