Flickering while zooming on some Android WebView with custom CSS-filter
See original GitHub issueChecklist
- I’ve looked at the documentation to make sure the behavior isn’t documented and expected.
- I’m sure this is an issue with Leaflet, not with my app or other dependencies (Angular, Cordova, React, etc.).
- I’ve searched through the current issues to make sure this hasn’t been reported yet.
- I agree to follow the Code of Conduct that this project adheres to.
Steps to reproduce
- Set a custom
CSS-filter
onimg
. For example:img { filter: invert(1); }
- Create an Android-app which opens the map in a WebView
- Pinch zoom
Expected behavior
While pinch-zooming some strange flickering can be seen; and it seems like a “none-styled map” is overlayed above the map. The issue is easier to see if you have zoomSnap
0.0001 or something similar.
Current behavior
The map should be pinch zoomed correctly
Minimal example reproducing the issue
https://github.com/andreandersson/leaflet-bug/tree/main
Environment
NOTE: This does not seem to be the case with most WebViews, but only some phones… We have been able to see it on Pixel 6 and 7 Pro. See video in the repo linked in the example reproducing the issue.
- Leaflet version: 1.9.2
- Browser (with version): Android System WebView 106.0.5249.126
- OS/Platform (with version): Android 13 (seen in 12 as well)
Issue Analytics
- State:
- Created a year ago
- Comments:7 (1 by maintainers)
Top Results From Across the Web
Android webview layer type flickering and scrolling issue
If I set layer type LAYER_TYPE_SOFTWARE then flicker issue resolved but it causes scroll issue. Here is my code: webview.setLayerType(View.
Read more >Managing WebView objects - Android Developers
Android provides several APIs to help you manage the WebView objects that display web content in your app. This page describes how to...
Read more >WebView Tips & Tricks - Chrome Developers
This article outlines some useful tips to enhance your application's user experience. # Flicker of colors when the application loads.
Read more >Solved: Re: Flickering in google not anywhere else - Page 3
Specifically, an update to "Android System Webview". ... Have noticed that for some weird reason when I using Google to search, ...
Read more >Working with the WebView | CodePath Android Cliffnotes
This document shows you how to get started with WebView and how to do some additional things, such as handle page navigation and...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
For 2.0 we’re aiming for latest Chrome (and Chromium derivatives), Firefox, Safari. Basically all the ‘evergreen’ targets.
Created a PR for this under #8651, hopefully to kickstart some more discussion.