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.

Flickering while zooming on some Android WebView with custom CSS-filter

See original GitHub issue

Checklist

  • 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

  1. Set a custom CSS-filter on img. For example: img { filter: invert(1); }
  2. Create an Android-app which opens the map in a WebView
  3. 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:closed
  • Created a year ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
jonkoopscommented, Nov 10, 2022

For 2.0 we’re aiming for latest Chrome (and Chromium derivatives), Firefox, Safari. Basically all the ‘evergreen’ targets.

0reactions
jonkoopscommented, Nov 10, 2022

Created a PR for this under #8651, hopefully to kickstart some more discussion.

Read more comments on GitHub >

github_iconTop 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 >

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