PaulLeCam / react-leaflet

React components for Leaflet maps
https://react-leaflet.js.org
Other
5.18k stars 887 forks source link

Popup flickers when closed #1093

Open dannybucks opened 1 year ago

dannybucks commented 1 year ago

Bug report in v4.0.2

Expected behavior

Popup closes smoothly when closed with close button or by clicking on map.

Actual behavior

Popup closes, however, it flickers / shows an empty popup for a split second.

Steps to reproduce

I did the same thing as in this answer: stackoverflow The answer contains a working example: jsfiddle The example uses an older version of react, we use react 18.2.0. However, the problem stays the same: you see the empty popup frame for a split second when closing the popup with the close button ("X")

The example in the docs wraps the Popup within a Marker. I tried that in the jsfiddle, the popup still flickers when closed.