Crude fix for issue#273 map loses focus when zooming in on cluster with keyboard

This commit is contained in:
Adam Bramley
2013-11-20 12:20:37 +13:00
parent 432cd19403
commit 975d3323b0
3 changed files with 11 additions and 1 deletions
+5
View File
@@ -604,6 +604,11 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
} else if (this.options.zoomToBoundsOnClick) {
e.layer.zoomToBounds();
}
// Focus the map again for keyboard users.
if (typeof e.originalEvent.keyCode !== 'undefined' && e.originalEvent.keyCode === 13) {
document.getElementById(map._container).focus();
}
},
_showCoverage: function (e) {
+1 -1
View File
File diff suppressed because one or more lines are too long
+5
View File
@@ -599,6 +599,11 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
} else if (this.options.zoomToBoundsOnClick) {
e.layer.zoomToBounds();
}
// Focus the map again for keyboard users.
if (typeof e.originalEvent.keyCode !== 'undefined' && e.originalEvent.keyCode === 13) {
document.getElementById(map._container).focus();
}
},
_showCoverage: function (e) {