[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-2-0' - loleaflet/src

Pranav Kant pranavk at collabora.co.uk
Fri Dec 16 21:53:44 UTC 2016


 loleaflet/src/map/Map.js |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit a8dc6cc29533ead37daeca01069f7d70c6258a3f
Author: Pranav Kant <pranavk at collabora.co.uk>
Date:   Fri Dec 16 23:08:44 2016 +0530

    loleaflet: Fix cursor dissappearing during document load
    
    Change-Id: I9e301d7d2b6e7d2626de91c242b7617fbc823572
    (cherry picked from commit dd4a5278ad034652b8dfd8984806f29a059e3581)
    Reviewed-on: https://gerrit.libreoffice.org/32106
    Reviewed-by: Andras Timar <andras.timar at collabora.com>
    Tested-by: Andras Timar <andras.timar at collabora.com>

diff --git a/loleaflet/src/map/Map.js b/loleaflet/src/map/Map.js
index b53c2d7..6a5972c 100644
--- a/loleaflet/src/map/Map.js
+++ b/loleaflet/src/map/Map.js
@@ -824,6 +824,7 @@ L.Map = L.Evented.extend({
 	_onLostFocus: function () {
 		if (!this._loaded) { return; }
 
+		console.debug('_onLostFocus: ');
 		var doclayer = this._docLayer;
 		if (!doclayer) { return; }
 
@@ -844,7 +845,9 @@ L.Map = L.Evented.extend({
 		if (!this._loaded) { return; }
 
 		var doclayer = this._docLayer;
-		if (doclayer) {
+		if (doclayer &&
+		    typeof doclayer._isCursorOverlayVisibleOnLostFocus !== 'undefined' &&
+		    typeof doclayer._isCursorVisibleOnLostFocus !== 'undefined') {
 			// we restore the old cursor position by a small delay, so that if the user clicks
 			// inside the document we skip to restore it, so that the user does not see the cursor
 			// jumping from the old position to the new one


More information about the Libreoffice-commits mailing list