Merge pull request #3275 from Jakobud/bug/keyboard-event-prevent-map-refocus
Prevent map refocus if control click event is from the keyboard
This commit is contained in:
commit
bba39b3eba
@ -71,8 +71,9 @@ L.Control = L.Class.extend({
|
||||
return this;
|
||||
},
|
||||
|
||||
_refocusOnMap: function () {
|
||||
if (this._map) {
|
||||
_refocusOnMap: function (e) {
|
||||
// if map exists and event is not a keyboard event
|
||||
if (this._map && e && e.screenX > 0 && e.screenY > 0) {
|
||||
this._map.getContainer().focus();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user