Skip to content

Commit

Permalink
Fix regression about popup close button modifying the URL
Browse files Browse the repository at this point in the history
Fixes #8159
  • Loading branch information
IvanSanchez committed Apr 19, 2022
1 parent 678fe43 commit 4b838e1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/layer/Popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,10 @@ export var Popup = DivOverlay.extend({
closeButton.href = '#close';
closeButton.innerHTML = '<span aria-hidden="true">&#215;</span>';

DomEvent.on(closeButton, 'click', this.close, this);
DomEvent.on(closeButton, 'click', function (ev) {
DomEvent.preventDefault(ev);
this.close();
}, this);
}
},

Expand Down

0 comments on commit 4b838e1

Please sign in to comment.