diff --git a/src/Popup.js b/src/Popup.js index 6d87e6ae..b7d8e6ec 100644 --- a/src/Popup.js +++ b/src/Popup.js @@ -129,14 +129,16 @@ export default class Popup extends MapComponent { render( Children.only(this.props.children), this.leafletElement._contentNode, + () => { + this.leafletElement.update() + if (this.props.autoPan !== false) { + if (this.leafletElement._map && this.leafletElement._map._panAnim) { + this.leafletElement._map._panAnim = undefined + } + this.leafletElement._adjustPan() + } + }, ) - this.leafletElement.update() - if (this.props.autoPan !== false) { - if (this.leafletElement._map && this.leafletElement._map._panAnim) { - this.leafletElement._map._panAnim = undefined - } - this.leafletElement._adjustPan() - } } }