loleaflet/src/layer/tile/TileLayer.js |    1 +
 loleaflet/src/map/Map.js              |    2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

New commits:
commit d104e82d742047104a79b984bf5b5391b9c76f26
Author: Pranav Kant <pran...@collabora.com>
Date:   Tue May 24 17:49:37 2016 +0530

    bccu#1811: Regain focus when inserting comment via context menu
    
    Change-Id: Ic06d86f0ef991c04e9fe3c1be7119868fff4fdc3

diff --git a/loleaflet/src/layer/tile/TileLayer.js 
b/loleaflet/src/layer/tile/TileLayer.js
index 8cbe56c..01800ab 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -506,6 +506,7 @@ L.TileLayer = L.GridLayer.extend({
                                                
this._twipsToLatLng(bottomRightTwips, this._map.getZoom()));
                this._isCursorOverlayVisible = true;
                this._onUpdateCursor();
+               this._map.focus();
        },
 
        _onPartPageRectanglesMsg: function (textMsg) {
diff --git a/loleaflet/src/map/Map.js b/loleaflet/src/map/Map.js
index 0b4ee8b..7d71fba 100644
--- a/loleaflet/src/map/Map.js
+++ b/loleaflet/src/map/Map.js
@@ -519,7 +519,7 @@ L.Map = L.Evented.extend({
        },
 
        focus: function () {
-               if (this._docLayer) {
+               if (this._docLayer && document.activeElement !== 
this._docLayer._textArea) {
                        this._docLayer._textArea.focus();
                }
        },
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to