I have a link inside of an infoWindow that when clicked, maximizes the window, makes an ajax call and does a setContent on the maximized infoWindow.I connect the event handler like this:connect.connect(map.infoWindow, "onShow", function() { ui.attachDetailsHandler(map); });
My ui module has a method like this:attachDetailsHandler: function(map) { var self = this; query(".details").on("click", function(e) { Event.stop(e); var site_id = domAttr.get(this, "id").substring(8); details.addDetails(site_id, map); }); }
If I close the infoWindow and open another, the event connects correctly. The problem comes in when I don't close the infoWindow first. If I just click another graphic on the map, it displays an infoWindow, but the event that should be attached to the link isn't connected. Because of this, the link just reloads the page instead of making my ajax call.Why do I need to hit the "X" before opening another infoWindow?