diff --git a/src/ol/Popup.js b/src/ol/Popup.js index cdad2ea22b..bb932685c1 100644 --- a/src/ol/Popup.js +++ b/src/ol/Popup.js @@ -208,7 +208,7 @@ ol.Popup.prototype.doOpen = function(opt_arg) { goog.dom.appendChild(this.container_, closeButton); goog.dom.classes.add(closeButton, ol.Popup.CLASS_NAME+'-close'); } - goog.events.listen(this.map_.getViewport(), 'click', this.clickHandler, + goog.events.listen(this.map_, 'click', this.clickHandler, undefined, this); goog.dom.appendChild(this.map_.getMapOverlay(), this.container_); }