title: Cant open popup programmatically
body: <p>I have a map on which im loading the markers with geoJSON.</p>
  
  <p>When the map loads i run a function <code>buildVisibleSys</code> which is responsible to build a list of currently visible systems on the map.</p>
  
  <p>That function looks like this:</p>
  
  <pre><code>buildVisibleSys = function() {
    var bounds, visibleSys;
    visibleSys = [];
    bounds = map.getBounds();
    return systemLocations.eachLayer(function(marker) {
      var link;
      link = onScreenEl.appendChild(document.createElement('a'));
      link.href = '#';
      link.id = "marker" + marker._leaflet_id;
      link.innerHTML = marker.options.title;
      link.onclick = function() {
        marker.openPopup();
        map.panTo(marker.getLatLng());
      };
    });
  };
  map.on('load', buildVisibleSys);
  </code></pre>
  
  <p>In this function, for each layer im getting some data and building a html block with the names of each marker. Each of those names, associated to the <code>link</code> var, have a onclick event attached that will center the map on the correspondent marker. This all works except for the <code>marker.openPopup()</code> call i also have on that <code>onclick</code> event.</p>
  
  <p>Any idea of what am I missing here?</p>
  
  <p>I've also made a demo of the code available here:
  <a href="http://jsfiddle.net/lmartins/z8wBW/" rel="nofollow">http://jsfiddle.net/lmartins/z8wBW/</a></p>
  
  <p>UPDATE:
  Even more confusing to me is that with mouseover the same method works without a problem, that is, in the function above the following code do open the popup:</p>
  
  <pre><code>   link.onmouseover = function(ev) {
        marker.openPopup();
        marker._icon.classList.add('is-active');
      };
  </code></pre>