title: Creating canvas inside the leaflet popup is not working fine
body: <p>I need help about <a href="http://leafletjs.com/" rel="nofollow noreferrer">leaflet</a> for my app.Firstly let me explain my problem,
  I insert the <a href="http://www.chartjs.org/" rel="nofollow noreferrer">Chart JS</a> element inside the marker popup.When I clicked on a marker,it is showing me all <code>DOM</code> elements which I created the elements for popup.But when I click other marker before close current popup,<code>Chart</code> element is not working fine.the fail occuring only for <code>Chart</code> elements.. not other <code>DOM</code> elements..
  The screenshot of what I'm trying to tell is as follows.
  First image explain when I click on a marker while all popups all closed.</p>
  
  <p><a href="https://i.stack.imgur.com/e4DmS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/e4DmS.png" alt="enter image description here"></a></p>
  
  <p>Second image is when a marker is open..</p>
  
  <p><a href="https://i.stack.imgur.com/sQ4t6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/sQ4t6.png" alt="enter image description here"></a></p>
  
  <p>This canvas element is my Chart element as you know.</p>
  
  <pre><code>let title="&lt;div style='margin-left:10px;'&gt;&lt;canvas style='clear:both; 
  position: relative;' id='myChart'&gt;&lt;/canvas&gt;&lt;/div&gt;";
  
  let marker = L.marker([parseFloat(poiData.lat), parseFloat(poiData.lon)],{
    data:{poiData,polyline}
  });
  
  marker.unbindPopup().bindPopup(title, { 
    autoPan:true,
    maxWidth: "auto"
  }).openPopup();
  
  marker.addTo(this.iconLayer);
  
  marker.on("click", (event: MouseEvent) =&gt; {
    let ctx = document.getElementById("myChart");
    let myChart = new Chart(ctx, {
      type: 'line',
      data: {
        labels: ['M', 'T', 'W', 'T', 'F', 'S', 'S'],
        datasets: [{
          label: 'Grafik',
          data: [2, 29, 5, 5, 2, 3, 10],
          backgroundColor: "rgba(255,153,0,0.4)"
        }]
      },
      options: {
        responsive: true
      }
    });
  });
  </code></pre>
  
  <p>Can you please suggest me any way to solve this problem?</p>