diff --git a/loleaflet/src/control/Control.ContextMenu.js b/loleaflet/src/control/Control.ContextMenu.js index 1947fb184f..4ae611a6a2 100644 --- a/loleaflet/src/control/Control.ContextMenu.js +++ b/loleaflet/src/control/Control.ContextMenu.js @@ -66,6 +66,8 @@ L.Control.ContextMenu = L.Control.extend({ return { callback: function(key) { map.sendUnoCommand(key); + // Give the stolen focus back to map + map.focus(); }, items: contextMenu }; diff --git a/loleaflet/src/layer/tile/TileLayer.js b/loleaflet/src/layer/tile/TileLayer.js index 01800ab712..8cbe56c492 100644 --- a/loleaflet/src/layer/tile/TileLayer.js +++ b/loleaflet/src/layer/tile/TileLayer.js @@ -506,7 +506,6 @@ L.TileLayer = L.GridLayer.extend({ this._twipsToLatLng(bottomRightTwips, this._map.getZoom())); this._isCursorOverlayVisible = true; this._onUpdateCursor(); - this._map.focus(); }, _onPartPageRectanglesMsg: function (textMsg) {