[Libreoffice-commits] online.git: loleaflet/src

Marco Cecchetti marco.cecchetti at collabora.com
Fri Dec 2 12:20:18 UTC 2016


 loleaflet/src/map/Map.js |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

New commits:
commit 1ee96c9d97d67cd63d6722c5e91a948bd9f6c581
Author: Marco Cecchetti <marco.cecchetti at collabora.com>
Date:   Wed Nov 30 16:40:01 2016 +0100

    loleaflet - calc: bad handling of text cursor on lost/got focus
    
    This patch fixes the following bug:
    
    Create blank sheet:
    enter "." ie. just a period into A1
    enter a "." into A2
    now switch virtual desktop away and back again.
    hit enter in A2
    now switch virtual desktop away and back again.
    
    You should have a blinking edit cursor in A2 - but the focus in A3.
    
    Change-Id: Icda0123f35ecda04559fec859b6bbe6ff3ac33e8
    Reviewed-on: https://gerrit.libreoffice.org/31541
    Reviewed-by: pranavk <pranavk at collabora.co.uk>
    Tested-by: pranavk <pranavk at collabora.co.uk>

diff --git a/loleaflet/src/map/Map.js b/loleaflet/src/map/Map.js
index c3f2697..002f990 100644
--- a/loleaflet/src/map/Map.js
+++ b/loleaflet/src/map/Map.js
@@ -827,9 +827,12 @@ L.Map = L.Evented.extend({
 		if (!this._loaded) { return; }
 
 		var doclayer = this._docLayer;
-		if (doclayer && doclayer._isCursorVisible && doclayer._isCursorOverlayVisible) {
-			doclayer._visibleCursorOnLostFocus = doclayer._visibleCursor;
-			doclayer._isCursorOverlayVisibleOnLostFocus = doclayer._isCursorVisibleOnLostFocus = true;
+		if (!doclayer) {
+			return;
+		}
+		doclayer._isCursorVisibleOnLostFocus = doclayer._isCursorOverlayVisible;
+		doclayer._isCursorOverlayVisibleOnLostFocus = doclayer._isCursorOverlayVisible;
+		if (doclayer._isCursorVisible && doclayer._isCursorOverlayVisible) {
 			doclayer._isCursorOverlayVisible = false;
 			doclayer._onUpdateCursor();
 		}


More information about the Libreoffice-commits mailing list