question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

MIGRATED: Android WebView don't apply CSS filter properly. (#20979)

See original GitHub issue

Migrated 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:closed
  • Created 5 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
LambyPantscommented, Nov 27, 2018

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.

1reaction
kevinNejadcommented, Nov 27, 2018

@Titozzz @LambyPants It works a treat.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Android WebView don't apply CSS filter properly. · Issue #20979
Filters applies to iOS perfectly but on android only applies to images and the rest of the page gets blurry.
Read more >
Android WebView CSS filter issue - Stack Overflow
I'm seeing a weird issue using the CSS filter attribute in my WebView. I have a WebView as part of a ViewPager. That...
Read more >
Build web apps in WebView - Android Developers
If you want to deliver a web application (or just a web page) as a part of a client application, you can do...
Read more >
Android WebView Example Tutorial - DigitalOcean
Still WebView comes with its own set of cons such as it's a much more expensive widget to use, in terms of memory...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found