Adds a check to make sure the closeButton option is set before focusing
This commit is contained in:
parent
0b9918fe4e
commit
5fec57d8ec
@ -7,7 +7,9 @@ L.Marker.include({
|
||||
if (this._popup && this._map && !this._map.hasLayer(this._popup)) {
|
||||
this._popup.setLatLng(this._latlng);
|
||||
this._map.openPopup(this._popup);
|
||||
this._popup._closeButton.focus();
|
||||
if (this._popup.options.closeButton) {
|
||||
this._popup._closeButton.focus();
|
||||
}
|
||||
}
|
||||
|
||||
return this;
|
||||
|
Loading…
Reference in New Issue
Block a user