[Pkg-javascript-commits] [leaflet] 266/301: Adds a check to make sure the closeButton option is set before focusing

Jonas Smedegaard js at moszumanska.debian.org
Mon Jan 27 22:22:56 UTC 2014


This is an automated email from the git hooks/post-receive script.

js pushed a commit to branch master
in repository leaflet.

commit 5fec57d8ec4ba46a946f83cc0490efaf14b36ff3
Author: Adam Bramley <adam at catalyst.net.nz>
Date:   Thu Nov 21 09:16:10 2013 +1300

    Adds a check to make sure the closeButton option is set before focusing
---
 src/layer/marker/Marker.Popup.js | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/layer/marker/Marker.Popup.js b/src/layer/marker/Marker.Popup.js
index 885bba7..b51a653 100644
--- a/src/layer/marker/Marker.Popup.js
+++ b/src/layer/marker/Marker.Popup.js
@@ -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;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/leaflet.git



More information about the Pkg-javascript-commits mailing list